code: def test_add_edges_from(self):
      G = self.Graph()
      G.add_edges_from([(0, 1), (0, 1, {"weight": 3})])
      assert G.adj == {
          0: {1: {0: {}, 1: {"weight": 3}}},
          1: {0: {0: {}, 1: {"weight": 3}}},
      }
      G.add_edges_from([(0, 1), (0, 1, {"weight": 3})], weight=2)
      assert G.adj == {
          0: {
              1: {
                  0: {},
                  1: {"weight": 3},
                  2: {"weight": 2},
                  3: {"weight": 3},
              }
          },
          1: {
              0: {
                  0: {},
                  1: {"weight": 3},
                  2: {"weight": 2},
                  3: {"weight": 3},
              }
          },
      }
      G = self.Graph()
      edges = [
          (0, 1, {"weight": 3}),
          (0, 1, (("weight", 2),)),
          (0, 1, 5),
          (0, 1, "s"),
      ]
      G.add_edges_from(edges)
      keydict = {0: {"weight": 3}, 1: {"weight": 2}, 5: {}, "s": {}}
      assert G._adj == {0: {1: keydict}, 1: {0: keydict}}
  
      # too few in tuple
      with pytest.raises(nx.NetworkXError):
          G.add_edges_from([(0,)])
      # too many in tuple
      with pytest.raises(nx.NetworkXError):
          G.add_edges_from([(0, 1, 2, 3, 4)])
      # not a tuple
      with pytest.raises(TypeError):
          G.add_edges_from([0])
  
imports: from collections import UserDict
  import pytest
  import networkx
  from networkx.utils import edges_equal
  from .test_graph import BaseAttrGraphTester
  from .test_graph import TestGraph
label_desc: Use image node_id 11 for calling the TestMultiGraph obj's underlying member method code with example usage: obj.test_add_edges_from() without return types