def lexicographic_product(G, H):
 GH = _init_product_graph(G, H)
 GH.add_nodes_from(_node_product(G, H))
 GH.add_edges_from(_edges_cross_nodes_and_nodes(G, H))
 GH.add_edges_from(_nodes_cross_edges(G, H))
 GH.name = (((('Lexicographic product(' + G.name) + ',') + H.name) + ')')
 return GH

def lexicographic_product ( G , H ) : GH = _init_product_graph ( G , H ) GH . add_nodes_from ( _node_product ( G , H ) ) GH . add_edges_from ( _edges_cross_nodes_and_nodes ( G , H ) ) GH . add_edges_from ( _nodes_cross_edges ( G , H ) ) GH . name = ( ( ( ( 'Lexicographic product(' + G . name ) + ',' ) + H . name ) + ')' ) return GH
return the lexicographic product of g and h .