The first node in nodes_for_star is the middle of the star. It is connected to all other nodes.

Parameters
• G_to_add_to (graph) – A NetworkX graph

• nodes_for_star (iterable container) – A container of nodes.

• attr (keyword arguments, optional (default= no attributes)) – Attributes to add to every edge in star.

>>> G = nx.Graph()