def test_G2(self):                   
        G=nx.DiGraph()
        G.add_weighted_edges_from([('s','u',10) ,('s','x',5) ,
                                   ('u','v',1) ,('u','x',2) ,
                                   ('v','y',1) ,('x','u',3) ,
                                   ('x','v',5) ,('x','y',2) ,
                                   ('y','s',7) ,('y','v',6)])

        b_answer={'y':5.0,'x':5.0,'s':4.0,'u':2.0,'v':2.0}

        b=nx.betweenness_centrality(G,
                                             weight='weight',
                                             normalized=False)
        for n in sorted(G):
            assert_almost_equal(b[n],b_answer[n])
Weighted betweenness centrality: G2
dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/algorithms/centrality/tests/test_betweenness_centrality.py/TestWeightedBetweennessCentrality.test_G2