code: def test_zero_weight(self):
      G = nx.DiGraph()
      edges = [
          (1, 2, -2),
          (2, 3, -4),
          (1, 5, 1),
          (5, 4, 0),
          (4, 3, -5),
          (2, 5, -7),
      ]
      G.add_weighted_edges_from(edges)
      dist = nx.floyd_warshall(G)
      assert dist[1][3] == -14
  
      G = nx.MultiDiGraph()
      edges.append((2, 5, -7))
      G.add_weighted_edges_from(edges)
      dist = nx.floyd_warshall(G)
      assert dist[1][3] == -14
  
file_path: networkx/networkx/algorithms/shortest_paths/tests/test_dense.py
imports: import pytest
  import networkx
label_desc: Use image node_id 9 for calling the TestFloyd obj's underlying member method code with example usage: obj.test_zero_weight() without return types