code: def test_weighted_digraph(self):
      G = nx.DiGraph()
      nx.add_cycle(G, [0, 1, 2], weight=2)
      nx.add_cycle(G, [2, 1, 0], weight=2)
      vitality = nx.closeness_vitality(G, weight="weight")
      assert vitality == {0: 8, 1: 8, 2: 8}
  
file_path: networkx/networkx/algorithms/tests/test_vitality.py
imports: import networkx
label_desc: Use image node_id 4 for calling the TestClosenessVitality obj's underlying member method code with example usage: obj.test_weighted_digraph() without return types