def disjoint_union(G, H):
 R1 = nx.convert_node_labels_to_integers(G)
 R2 = nx.convert_node_labels_to_integers(H, first_label=len(R1))
 R = union(R1, R2)
 R.name = ('disjoint_union( %s, %s )' % (G.name, H.name))
 R.graph.update(G.graph)
 R.graph.update(H.graph)
 return R

def disjoint_union ( G , H ) : R1 = nx . convert_node_labels_to_integers ( G ) R2 = nx . convert_node_labels_to_integers ( H , first_label = len ( R1 ) ) R = union ( R1 , R2 ) R . name = ( 'disjoint_union( %s, %s )' % ( G . name , H . name ) ) R . graph . update ( G . graph ) R . graph . update ( H . graph ) return R
return the disjoint union of graphs g and h .