code: def test_all_pairs_dijkstra_path_length(self):
      cycle = nx.cycle_graph(7)
      pl = dict(nx.all_pairs_dijkstra_path_length(cycle))
      assert pl[0] == {0: 0, 1: 1, 2: 2, 3: 3, 4: 3, 5: 2, 6: 1}
  
      cycle[1][2]["weight"] = 10
      pl = dict(nx.all_pairs_dijkstra_path_length(cycle))
      assert pl[0] == {0: 0, 1: 1, 2: 5, 3: 4, 4: 3, 5: 2, 6: 1}
  
imports: import pytest
  import networkx
  from networkx.utils import pairwise
label_desc: Use image node_id 17 for calling the TestWeightedPath obj's underlying member method code with example usage: obj.test_all_pairs_dijkstra_path_length() without return types