def trigger_event(self, event, *args, **kwargs):
        """
        Trigger that calls all of the specified events associated with this class.
        """
        for event_class, event_callbacks in six.iteritems(self._event_callbacks):
            if not isinstance(self, event_class):
                continue
            for callback in event_callbacks.get(event, []):
                try:
                    # callbacks are protected
                    callback(*args, **kwargs)
                except __HOLE__:
                    return
                except BaseException:
                    logger.exception("Error in event callback for %r", event)
dataset/ETHPy150Open spotify/luigi/luigi/task.py/Task.trigger_event