code: def test_path_graph(self):
      G = nx.path_graph(4)
      assert nx.single_source_bellman_ford_path(G, 0) == {
          0: [0],
          1: [0, 1],
          2: [0, 1, 2],
          3: [0, 1, 2, 3],
      }
      assert nx.single_source_bellman_ford_path_length(G, 0) == {
          0: 0,
          1: 1,
          2: 2,
          3: 3,
      }
      assert nx.single_source_bellman_ford(G, 0) == (
          {0: 0, 1: 1, 2: 2, 3: 3},
          {0: [0], 1: [0, 1], 2: [0, 1, 2], 3: [0, 1, 2, 3]},
      )
      assert nx.bellman_ford_predecessor_and_distance(G, 0) == (
          {0: [], 1: [0], 2: [1], 3: [2]},
          {0: 0, 1: 1, 2: 2, 3: 3},
      )
      assert nx.goldberg_radzik(G, 0) == (
          {0: None, 1: 0, 2: 1, 3: 2},
          {0: 0, 1: 1, 2: 2, 3: 3},
      )
      assert nx.single_source_bellman_ford_path(G, 3) == {
          0: [3, 2, 1, 0],
          1: [3, 2, 1],
          2: [3, 2],
          3: [3],
      }
      assert nx.single_source_bellman_ford_path_length(G, 3) == {
          0: 3,
          1: 2,
          2: 1,
          3: 0,
      }
      assert nx.single_source_bellman_ford(G, 3) == (
          {0: 3, 1: 2, 2: 1, 3: 0},
          {0: [3, 2, 1, 0], 1: [3, 2, 1], 2: [3, 2], 3: [3]},
      )
      assert nx.bellman_ford_predecessor_and_distance(G, 3) == (
          {0: [1], 1: [2], 2: [3], 3: []},
          {0: 3, 1: 2, 2: 1, 3: 0},
      )
      assert nx.goldberg_radzik(G, 3) == (
          {0: 1, 1: 2, 2: 3, 3: None},
          {0: 3, 1: 2, 2: 1, 3: 0},
      )
  
imports: import pytest
  import networkx
  from networkx.utils import pairwise
label_desc: Use image node_id 15 for calling the TestBellmanFordAndGoldbergRadzik obj's underlying member method code with example usage: obj.test_path_graph() without return types