code: def test_all_shortest_paths(self):
      G = nx.Graph()
      nx.add_path(G, [0, 1, 2, 3])
      nx.add_path(G, [0, 10, 20, 3])
      assert [[0, 1, 2, 3], [0, 10, 20, 3]] == sorted(
          nx.all_shortest_paths(G, 0, 3)
      )
      # with weights
      G = nx.Graph()
      nx.add_path(G, [0, 1, 2, 3])
      nx.add_path(G, [0, 10, 20, 3])
      assert [[0, 1, 2, 3], [0, 10, 20, 3]] == sorted(
          nx.all_shortest_paths(G, 0, 3, weight="weight")
      )
      # weights and method specified
      G = nx.Graph()
      nx.add_path(G, [0, 1, 2, 3])
      nx.add_path(G, [0, 10, 20, 3])
      assert [[0, 1, 2, 3], [0, 10, 20, 3]] == sorted(
          nx.all_shortest_paths(
              G, 0, 3, weight="weight", method="dijkstra"
          )
      )
      G = nx.Graph()
      nx.add_path(G, [0, 1, 2, 3])
      nx.add_path(G, [0, 10, 20, 3])
      assert [[0, 1, 2, 3], [0, 10, 20, 3]] == sorted(
          nx.all_shortest_paths(
              G, 0, 3, weight="weight", method="bellman-ford"
          )
      )
  
imports: import pytest
  import networkx
label_desc: Use image node_id 14 for calling the TestGenericPath obj's underlying member method code with example usage: obj.test_all_shortest_paths() without return types