@nodes_or_number(0)
def star_graph(n, create_using=None):
 (n_name, nodes) = n
 if isinstance(n_name, int):
  nodes = (nodes + [n_name])
 first = nodes[0]
 G = empty_graph(nodes, create_using)
 if G.is_directed():
  raise nx.NetworkXError('Directed Graph not supported')
 G.add_edges_from(((first, v) for v in nodes[1:]))
 G.name = ('star_graph(%s)' % (n_name,))
 return G

@ nodes_or_number ( 0 ) def star_graph ( n , create_using = None ) : ( n_name , nodes ) = n if isinstance ( n_name , int ) : nodes = ( nodes + [ n_name ] ) first = nodes [ 0 ] G = empty_graph ( nodes , create_using ) if G . is_directed ( ) : raise nx . NetworkXError ( 'Directed Graph not supported' ) G . add_edges_from ( ( ( first , v ) for v in nodes [ 1 : ] ) ) G . name = ( 'star_graph(%s)' % ( n_name , ) ) return G
return the star graph the star graph consists of one center node connected to n outer nodes .