def _triggering_ctx(self):
        """
        Context manager that ensures that a hook is not re-triggered by one of its handlers.
        """
        if self._is_triggering:
            raise RuntimeError('{} cannot be triggered while it is being handled'.format(self))
        self._is_triggering = True
        try:
            yield self
        finally:
            self._is_triggering = False