def test_in_place(self):
        G = nx.DiGraph()
        G.add_edge(0, 1, weight=1)
        G.add_edge(0, 2, weight=1)
        nx.stochastic_graph(G, copy=False)
        assert_equal(sorted(G.edges(data=True)),
                     [(0, 1, {'weight': 0.5}), (0, 2, {'weight': 0.5})])
Tests for an in-place reweighting of the edges of the graph.
dataset/ETHPy150Open networkx/networkx/networkx/generators/tests/test_stochastic.py/TestStochasticGraph.test_in_place