def tearDown(self):
        """
        Remove all remaining triggers from the reactor.
        """
        while self.triggers:
            trigger = self.triggers.pop()
            try:
                reactor.removeSystemEventTrigger(trigger)
            except (ValueError, KeyError):
                pass

        Remove all remaining triggers from the reactor.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_internet.py