def addTrigger(self, event, phase, func):
        """
        Add a trigger to the reactor and remember it in C{self.triggers}.
        """
        t = reactor.addSystemEventTrigger(event, phase, func)
        self.triggers.append(t)
        return t

        Add a trigger to the reactor and remember it in C{self.triggers}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_internet.py