def METHOD_NAME(self, name: str, *args: Any,
         allowed_exceptions: tuple[type[Exception], ...] = ()) -> list:
    """Emit a Sphinx event."""
    # not every object likes to be repr()'d (think
    # random stuff coming via autodoc)
    with contextlib.suppress(Exception):
        logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
    results = []
    listeners = sorted(self.listeners[name], key=attrgetter("priority"))
    for listener in listeners:
        try:
            results.append(listener.handler(self.app, *args))
        except allowed_exceptions:
            # pass through the errors specified as *allowed_exceptions*
            raise
        except SphinxError:
            raise
        except Exception as exc:
            if self.app.pdb:
                # Just pass through the error, so that it can be debugged.
                raise
            modname = safe_getattr(listener.handler, '__module__', None)
            raise ExtensionError(__("Handler %r for event %r threw an exception") %
                                 (listener.handler, name), exc, modname=modname) from exc
    return results