code: def testInPlaceAddition(self):
      g = Graph.Full(3)
      orig = g
  
      # Adding vertices
      g += 2
      self.assertTrue(
          g.vcount() == 5
          and g.ecount() == 3
          and g.connected_components().membership == [0, 0, 0, 1, 2]
      )
  
      # Adding a vertex by name
      g += "spam"
      self.assertTrue(
          g.vcount() == 6
          and g.ecount() == 3
          and g.connected_components().membership == [0, 0, 0, 1, 2, 3]
      )
  
      # Adding a single edge
      g += (2, 3)
      self.assertTrue(
          g.vcount() == 6
          and g.ecount() == 4
          and g.connected_components().membership == [0, 0, 0, 0, 1, 2]
      )
  
      # Adding two edges
      g += [(3, 4), (2, 4), (4, 5)]
      self.assertTrue(
          g.vcount() == 6
          and g.ecount() == 7
          and g.connected_components().membership == [0] * 6
      )
  
      # Adding two more vertices
      g += ["eggs", "bacon"]
      self.assertEqual(
          g.vs["name"],
          [None, None, None, None, None, "spam", "eggs", "bacon"],
      )
  
      # Did we really use the original graph so far?
      # TODO: disjoint union should be modified so that this assertion
      # could be moved to the end
      self.assertTrue(id(g) == id(orig))
  
      # Adding another graph
      g += Graph.Full(3)
      self.assertTrue(
          g.vcount() == 11
          and g.ecount() == 10
          and g.connected_components().membership
          == [0, 0, 0, 0, 0, 0, 1, 2, 3, 3, 3]
      )
  
      # Adding two graphs
      g += [Graph.Full(3), Graph.Full(2)]
      self.assertTrue(
          g.vcount() == 16
          and g.ecount() == 14
          and g.connected_components().membership
          == [0, 0, 0, 0, 0, 0, 1, 2, 3, 3, 3, 4, 4, 4, 5, 5]
      )
  
imports: import unittest
  from igraph import Graph, disjoint_union, intersection, union
label_desc: Use image node_id 23 for calling the OperatorTests obj's underlying member method code with example usage: obj.testInPlaceAddition() without return types