def fireEvent(self):
        """
        Call the triggers added to this event.
        """
        self.state = 'BEFORE'
        self.finishedBefore = []
        beforeResults = []
        while self.before:
            callable, args, kwargs = self.before.pop(0)
            self.finishedBefore.append((callable, args, kwargs))
            try:
                result = callable(*args, **kwargs)
            except:
                log.err()
            else:
                if isinstance(result, Deferred):
                    beforeResults.append(result)
        DeferredList(beforeResults).addCallback(self._continueFiring)

        Call the triggers added to this event.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/base.py