title: How to measure the graph edit distance by considering the node names
body: <p>I have defined two Graphs in python using the library networkx and now I want to measure the distance between those two graphs considering the nodes' "names"</p>
  
  <p>I created two Graphs, looking totally the same (tree graphs)</p>
  
  <pre class="lang-py prettyprint-override"><code>G=nx.Graph()
  G.add_edges_from([("A","B"),("A","C")])
  
  H=nx.Graph()
  H.add_edges_from([("X","Y"),("X","Z")])
  
  res=nx.graph_edit_distance(G,H)
  res2=nx.optimize_edit_paths(G,H)
  res3=nx.optimal_edit_paths(G,H)
  </code></pre>
  
  <p>I want all nodes to be replaced, because the nodes don't have the same name, but I get the result for the cost (changes/ distance) 0. This means that the function is not considering the nodes' names. </p>
  
  <p>In the <a href="https://networkx.github.io/documentation/latest/reference/algorithms/generated/networkx.algorithms.similarity.optimal_edit_paths.html" rel="nofollow noreferrer">documentation</a> it is suggested to use the function "node_math" but I don't know how to use it. It does not seem to be a networkx function. </p>