code: def test_path_weighted_projected_graph(self):
      G = nx.path_graph(4)
  
      with pytest.raises(nx.NetworkXAlgorithmError):
          bipartite.weighted_projected_graph(G, [1, 2, 3, 3])
  
      P = bipartite.weighted_projected_graph(G, [1, 3])
      assert nodes_equal(list(P), [1, 3])
      assert edges_equal(list(P.edges()), [(1, 3)])
      P[1][3]["weight"] = 1
      P = bipartite.weighted_projected_graph(G, [0, 2])
      assert nodes_equal(list(P), [0, 2])
      assert edges_equal(list(P.edges()), [(0, 2)])
      P[0][2]["weight"] = 1
  
imports: import pytest
  import networkx
  from networkx.algorithms import bipartite
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 5 for calling the TestBipartiteProject obj's underlying member method code with example usage: obj.test_path_weighted_projected_graph() without return types