code: def test_to_agraph_with_edgedata(self, graph_class):
      G = graph_class()
      G.add_nodes_from([0, 1])
      G.add_edge(0, 1, color="yellow")
      A = nx.nx_agraph.to_agraph(G)
      assert dict(A.edges()[0].attr) == {"color": "yellow"}
  
imports: import warnings
  import pytest
  import networkx
  from networkx.utils import edges_equal, graphs_equal, nodes_equal
label_desc: Use image node_id 8 for calling the TestAGraph obj's underlying member method code with example usage: obj.test_to_agraph_with_edgedata(graph_class) without return types