code: def test_weight_keyword(self):
      WP4 = nx.Graph()
      WP4.add_edges_from(
          (n, n + 1, {"weight": 0.5, "other": 0.3}) for n in range(3)
      )
      P4 = path_graph(4)
      A = nx.to_scipy_sparse_array(P4)
      np.testing.assert_equal(
          A.todense(),
          nx.to_scipy_sparse_array(WP4, weight=None).todense(),
      )
      np.testing.assert_equal(
          0.5 * A.todense(), nx.to_scipy_sparse_array(WP4).todense()
      )
      np.testing.assert_equal(
          0.3 * A.todense(),
          nx.to_scipy_sparse_array(WP4, weight="other").todense(),
      )
  
imports: import pytest
  import networkx
  from networkx.generators.classic import barbell_graph, cycle_graph, path_graph
  from networkx.utils import graphs_equal
label_desc: Use image node_id 11 for calling the TestConvertScipy obj's underlying member method code with example usage: obj.test_weight_keyword() without return types