code: def test_zero_cycle(self):
      G = nx.cycle_graph(5, create_using=nx.DiGraph())
      G.add_edge(2, 3, weight=-4)
      # check that zero cycle doesn't raise
      nx.goldberg_radzik(G, 1)
      nx.bellman_ford_predecessor_and_distance(G, 1)
  
      G.add_edge(2, 3, weight=-4.0001)
      # check that negative cycle does raise
      pytest.raises(
          nx.NetworkXUnbounded,
          nx.bellman_ford_predecessor_and_distance,
          G,
          1,
      )
      pytest.raises(nx.NetworkXUnbounded, nx.goldberg_radzik, G, 1)
  
imports: import pytest
  import networkx
  from networkx.utils import pairwise
label_desc: Use image node_id 7 for calling the TestBellmanFordAndGoldbergRadzik obj's underlying member method code with example usage: obj.test_zero_cycle() without return types