code: def test_negative_weights(self):
      G = nx.DiGraph()
      G.add_weighted_edges_from(
          [
              ("0", "3", 3),
              ("0", "1", -5),
              ("0", "2", 2),
              ("1", "2", 4),
              ("2", "3", 1),
          ]
      )
      paths = nx.johnson(G)
      assert paths == {
          "1": {"1": ["1"], "3": ["1", "2", "3"], "2": ["1", "2"]},
          "0": {
              "1": ["0", "1"],
              "0": ["0"],
              "3": ["0", "1", "2", "3"],
              "2": ["0", "1", "2"],
          },
          "3": {"3": ["3"]},
          "2": {"3": ["2", "3"], "2": ["2"]},
      }
  
imports: import pytest
  import networkx
  from networkx.utils import pairwise
label_desc: Use image node_id 3 for calling the TestJohnsonAlgorithm obj's underlying member method code with example usage: obj.test_negative_weights() without return types