def tensor_product(G, H):
 GH = _init_product_graph(G, H)
 GH.add_nodes_from(_node_product(G, H))
 GH.add_edges_from(_directed_edges_cross_edges(G, H))
 if (not GH.is_directed()):
  GH.add_edges_from(_undirected_edges_cross_edges(G, H))
 GH.name = (((('Tensor product(' + G.name) + ',') + H.name) + ')')
 return GH

def tensor_product ( G , H ) : GH = _init_product_graph ( G , H ) GH . add_nodes_from ( _node_product ( G , H ) ) GH . add_edges_from ( _directed_edges_cross_edges ( G , H ) ) if ( not GH . is_directed ( ) ) : GH . add_edges_from ( _undirected_edges_cross_edges ( G , H ) ) GH . name = ( ( ( ( 'Tensor product(' + G . name ) + ',' ) + H . name ) + ')' ) return GH
return the tensor product of g and h .