docstr: Edge betweenness subset centrality: Weighted Graph
docstr_tok: ["Edge","betweenness","subset","centrality",":","Weighted","Graph"]
code: def test_weighted_graph(self):
      """Edge betweenness subset centrality: 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 = dict.fromkeys(G.edges(), 0)
      b_answer[(0, 2)] = b_answer[(2, 4)] = b_answer[(4, 5)] = 0.5
      b_answer[(0, 3)] = b_answer[(3, 5)] = 0.5
      b = nx.edge_betweenness_centrality_subset(
          G, sources=[0], targets=[5], normalized=False, weight="weight"
      )
      for n in G.edges():
          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 TestEdgeSubsetBetweennessCentrality obj's underlying member method code with example usage: obj.test_weighted_graph() without return types