@nodes_or_number([0, 1])
def complete_bipartite_graph(n1, n2, create_using=None):
 if (create_using is None):
  G = nx.Graph()
 else:
  if create_using.is_directed():
   raise nx.NetworkXError('Directed Graph not supported')
  G = create_using
  G.clear()
 (n1, top) = n1
 (n2, bottom) = n2
 if isinstance(n2, int):
  bottom = [(n1 + i) for i in bottom]
 G.add_nodes_from(top, bipartite=0)
 G.add_nodes_from(bottom, bipartite=1)
 G.add_edges_from(((u, v) for u in top for v in bottom))
 G.graph['name'] = ('complete_bipartite_graph(%s,%s)' % (n1, n2))
 return G

@ nodes_or_number ( [ 0 , 1 ] ) def complete_bipartite_graph ( n1 , n2 , create_using = None ) : if ( create_using is None ) : G = nx . Graph ( ) else : if create_using . is_directed ( ) : raise nx . NetworkXError ( 'Directed Graph not supported' ) G = create_using G . clear ( ) ( n1 , top ) = n1 ( n2 , bottom ) = n2 if isinstance ( n2 , int ) : bottom = [ ( n1 + i ) for i in bottom ] G . add_nodes_from ( top , bipartite = 0 ) G . add_nodes_from ( bottom , bipartite = 1 ) G . add_edges_from ( ( ( u , v ) for u in top for v in bottom ) ) G . graph [ 'name' ] = ( 'complete_bipartite_graph(%s,%s)' % ( n1 , n2 ) ) return G
return the complete bipartite graph k_{n_1 .