code: def testDifferenceWithSelfLoop(self):
      # https://github.com/igraph/igraph/issues/597#
      g = Graph.Ring(10) + [(0, 0)]
      g -= Graph.Ring(5)
      self.assertTrue(g.vcount() == 10 and g.ecount() == 7)
      self.assertTrue(
          sorted(g.get_edgelist())
          == [(0, 0), (0, 9), (4, 5), (5, 6), (6, 7), (7, 8), (8, 9)]
      )
  
imports: import unittest
  from igraph import Graph, disjoint_union, intersection, union
label_desc: Use image node_id 4 for calling the OperatorTests obj's underlying member method code with example usage: obj.testDifferenceWithSelfLoop() without return types