def METHOD_NAME(self):
    G = nk.generators.ErdosRenyiGenerator(10, 0.1).generate()
    rc_initial = sys.getrefcount(G)
    algo = nk.randomization.EdgeSwitchingInPlace(G)
    self.assertGreater(sys.getrefcount(G), rc_initial)
    algo.run()
    self.assertGreater(sys.getrefcount(G), rc_initial)
    del(algo)
    self.assertEqual(sys.getrefcount(G), rc_initial)