code: def test_write_edgelist_2(self):
      fh = io.BytesIO()
      G = nx.Graph()
      G.add_edges_from([(1, 2), (2, 3)])
      nx.write_edgelist(G, fh, data=True)
      fh.seek(0)
      assert fh.read() == b"1 2 {}\n2 3 {}\n"
  
imports: import io
  import textwrap
  import pytest
  import networkx
  from networkx.utils import edges_equal, graphs_equal, nodes_equal
label_desc: Use image node_id 3 for calling the TestEdgelist obj's underlying member method code with example usage: obj.test_write_edgelist_2() without return types