code: def test_add_edge(self):
      G = self.Graph()
      G.add_edge(0, 1)
      assert G._adj == {0: {1: {0: {}}}, 1: {}}
      assert G._succ == {0: {1: {0: {}}}, 1: {}}
      assert G._pred == {0: {}, 1: {0: {0: {}}}}
      G = self.Graph()
      G.add_edge(*(0, 1))
      assert G._adj == {0: {1: {0: {}}}, 1: {}}
      assert G._succ == {0: {1: {0: {}}}, 1: {}}
      assert G._pred == {0: {}, 1: {0: {0: {}}}}
      with pytest.raises(ValueError, match="None cannot be a node"):
          G.add_edge(None, 3)
  
imports: from collections import UserDict
  import pytest
  import networkx
  from networkx.utils import edges_equal
  from .test_multigraph import BaseMultiGraphTester
  from .test_multigraph import TestEdgeSubgraph
  from .test_multigraph import TestMultiGraph
label_desc: Use image node_id 2 for calling the TestMultiDiGraph obj's underlying member method code with example usage: obj.test_add_edge() without return types