@nodes_or_number(0)
def wheel_graph(n, create_using=None):
 (n_name, nodes) = n
 if (n_name == 0):
  G = nx.empty_graph(0, create_using=create_using)
  G.name = 'wheel_graph(0)'
  return G
 G = star_graph(nodes, create_using)
 G.name = ('wheel_graph(%s)' % (n_name,))
 if (len(G) > 2):
  G.add_edges_from(pairwise(nodes[1:]))
  G.add_edge(nodes[(-1)], nodes[1])
 return G

@ nodes_or_number ( 0 ) def wheel_graph ( n , create_using = None ) : ( n_name , nodes ) = n if ( n_name == 0 ) : G = nx . empty_graph ( 0 , create_using = create_using ) G . name = 'wheel_graph(0)' return G G = star_graph ( nodes , create_using ) G . name = ( 'wheel_graph(%s)' % ( n_name , ) ) if ( len ( G ) > 2 ) : G . add_edges_from ( pairwise ( nodes [ 1 : ] ) ) G . add_edge ( nodes [ ( - 1 ) ] , nodes [ 1 ] ) return G
return the wheel graph the wheel graph consists of a hub node connected to a cycle of nodes .