code: def setup_class(cls):
      cls.G = nx.Graph(name="test")
      e = [
          ("a", "b"),
          ("b", "c"),
          ("c", "d"),
          ("d", "e"),
          ("e", "f"),
          ("a", "f"),
      ]
      cls.G.add_edges_from(e)
      cls.G.add_node("g")
      cls.DG = nx.DiGraph(cls.G)
  
file_path: networkx/networkx/readwrite/tests/test_p2g.py
imports: import io
  import networkx
  from networkx.readwrite.p2g import read_p2g, write_p2g
  from networkx.utils import edges_equal
label_desc: Use image node_id 1 for calling the TestP2G obj's underlying member method code with example usage: obj.setup_class(cls) without return types