code: def test_write_edgelist_3(self):
      fh = io.BytesIO()
      G = nx.Graph()
      G.add_edge(1, 2, weight=2.0)
      G.add_edge(2, 3, weight=3.0)
      nx.write_edgelist(G, fh, data=True)
      fh.seek(0)
      assert fh.read() == b"1 2 {'weight': 2.0}\n2 3 {'weight': 3.0}\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 4 for calling the TestEdgelist obj's underlying member method code with example usage: obj.test_write_edgelist_3() without return types