docstr: Betweenness Centrality Subset: Weighted Graph
docstr_tok: ["Betweenness","Centrality","Subset",":","Weighted","Graph"]
code: def test_weighted_graph(self):
      """Betweenness Centrality Subset: Weighted Graph"""
      G = nx.DiGraph()
      G.add_edge(0, 1, weight=3)
      G.add_edge(0, 2, weight=2)
      G.add_edge(0, 3, weight=6)
      G.add_edge(0, 4, weight=4)
      G.add_edge(1, 3, weight=5)
      G.add_edge(1, 5, weight=5)
      G.add_edge(2, 4, weight=1)
      G.add_edge(3, 4, weight=2)
      G.add_edge(3, 5, weight=1)
      G.add_edge(4, 5, weight=4)
      b_answer = {0: 0.0, 1: 0.0, 2: 0.5, 3: 0.5, 4: 0.5, 5: 0.0}
      b = nx.betweenness_centrality_subset(
          G, sources=[0], targets=[5], normalized=False, weight="weight"
      )
      for n in sorted(G):
          assert b[n] == pytest.approx(b_answer[n], abs=1e-7)
  
imports: import pytest
  import networkx
label_desc: Use image node_id 11 for calling the TestSubsetBetweennessCentrality obj's underlying member method code with example usage: obj.test_weighted_graph() without return types