def METHOD_NAME(self):
    for numSwitchesPerEdge, preShuffle in [(0, False), (0, True), (1, False)]:
        G = nk.generators.ErdosRenyiGenerator(100, 0.1).generate()
        algo = nk.randomization.EdgeSwitching(G, numSwitchesPerEdge + 1, preShuffle)
        self.assertEqual(algo.getNumberOfSwitchesPerEdge(), numSwitchesPerEdge + 1)
        algo.setNumberOfSwitchesPerEdge(numSwitchesPerEdge)
        self.assertEqual(algo.getNumberOfSwitchesPerEdge(), numSwitchesPerEdge)
        numSwitches = numSwitchesPerEdge * G.numberOfEdges()
        algo.run()
        G1 = algo.getGraph()
        self.assertEqual(G1.numberOfNodes(), G.numberOfNodes())
        self.assertEqual(G1.numberOfEdges(), G.numberOfEdges())
        if numSwitches > 0 or preShuffle:
            self.assertNotEqual(sorted(G.iterEdges()), sorted(G1.iterEdges()))
        else:
            self.assertEqual(sorted(G.iterEdges()), sorted(G1.iterEdges()))
        self.assertGreaterEqual(algo.getNumberOfAffectedEdges(), numSwitches // 2)