code: def test_edgelists(self):
      P = nx.path_graph(4)
      e = [(0, 1), (1, 2), (2, 3)]
      G = nx.Graph(e)
      assert nodes_equal(sorted(G.nodes()), sorted(P.nodes()))
      assert edges_equal(sorted(G.edges()), sorted(P.edges()))
      assert edges_equal(
          sorted(G.edges(data=True)), sorted(P.edges(data=True))
      )
  
      e = [(0, 1, {}), (1, 2, {}), (2, 3, {})]
      G = nx.Graph(e)
      assert nodes_equal(sorted(G.nodes()), sorted(P.nodes()))
      assert edges_equal(sorted(G.edges()), sorted(P.edges()))
      assert edges_equal(
          sorted(G.edges(data=True)), sorted(P.edges(data=True))
      )
  
      e = ((n, n + 1) for n in range(3))
      G = nx.Graph(e)
      assert nodes_equal(sorted(G.nodes()), sorted(P.nodes()))
      assert edges_equal(sorted(G.edges()), sorted(P.edges()))
      assert edges_equal(
          sorted(G.edges(data=True)), sorted(P.edges(data=True))
      )
  
imports: import pytest
  import networkx
  from networkx.convert import from_dict_of_dicts, from_dict_of_lists, to_dict_of_dicts, to_dict_of_lists, to_networkx_graph
  from networkx.generators.classic import barbell_graph, cycle_graph
  from networkx.utils import edges_equal, graphs_equal, nodes_equal
label_desc: Use image node_id 7 for calling the TestConvert obj's underlying member method code with example usage: obj.test_edgelists() without return types