code: def test_read_weighted_edgelist():
      bytesIO = io.BytesIO(edges_with_values.encode("utf-8"))
      G = nx.read_weighted_edgelist(bytesIO, nodetype=int)
      assert edges_equal(G.edges(data=True), _expected_edges_weights)
  
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 2 for calling a global function with example usage: test_read_weighted_edgelist() without return types