code: def test_from_agraph_named_edges(self):
      # Create an AGraph from an existing (non-multi) Graph
      G = nx.Graph()
      G.add_nodes_from([0, 1])
      A = nx.nx_agraph.to_agraph(G)
      # Add edge (+ name, given by key) to the AGraph
      A.add_edge(0, 1, key="foo")
      # Verify a.name roundtrips out to 'key' in from_agraph
      H = nx.nx_agraph.from_agraph(A)
      assert isinstance(H, nx.Graph)
      assert ("0", "1", {"key": "foo"}) in H.edges(data=True)
  
imports: import warnings
  import pytest
  import networkx
  from networkx.utils import edges_equal, graphs_equal, nodes_equal
label_desc: Use image node_id 6 for calling the TestAGraph obj's underlying member method code with example usage: obj.test_from_agraph_named_edges() without return types