class_docstr: Unit tests for the approximate minimum weighted vertex cover
  function,
  :func:`~networkx.algorithms.approximation.vertex_cover.min_weighted_vertex_cover`.
code: def test_weighted(self):
      wg = nx.Graph()
      wg.add_node(0, weight=10)
      wg.add_node(1, weight=1)
      wg.add_node(2, weight=1)
      wg.add_node(3, weight=1)
      wg.add_node(4, weight=1)
  
      wg.add_edge(0, 1)
      wg.add_edge(0, 2)
      wg.add_edge(0, 3)
      wg.add_edge(0, 4)
  
      wg.add_edge(1, 2)
      wg.add_edge(2, 3)
      wg.add_edge(3, 4)
      wg.add_edge(4, 1)
  
      cover = min_weighted_vertex_cover(wg, weight="weight")
      csum = sum(wg.nodes[node]["weight"] for node in cover)
      assert 4 == csum
      assert is_cover(wg, cover)
  
file_path: networkx/networkx/algorithms/approximation/tests/test_vertex_cover.py
imports: import networkx
  from networkx.algorithms.approximation import min_weighted_vertex_cover
label_desc: Use image node_id 3 for calling the TestMWVC obj's underlying member method code with example usage: obj.test_weighted() without return types