code: def test_write_pajek(self):
      import io
  
      G = nx.parse_pajek(self.data)
      fh = io.BytesIO()
      nx.write_pajek(G, fh)
      fh.seek(0)
      H = nx.read_pajek(fh)
      assert nodes_equal(list(G), list(H))
      assert edges_equal(list(G.edges()), list(H.edges()))
  
file_path: networkx/networkx/readwrite/tests/test_pajek.py
imports: import networkx
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 6 for calling the TestPajek obj's underlying member method code with example usage: obj.test_write_pajek() without return types