def test_P3_endpoints(self):
        G=nx.path_graph(3)
        b_answer={0: 2.0, 1: 3.0, 2: 2.0}
        b=nx.betweenness_centrality(G,
                                          weight=None,
                                          normalized=False,
                                          endpoints=True)
        for n in sorted(G):
            assert_almost_equal(b[n],b_answer[n])
Inserts new element at location index in the list of parsed tokens.
dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/algorithms/centrality/tests/test_betweenness_centrality.py/TestBetweennessCentrality.test_P3_endpoints--crossover with--dataset/ETHPy150Open pypa/pip/pip/_vendor/pyparsing.py/ParseResults.insert