def METHOD_NAME(
    name: str, revision: str, options: Mapping[str, Union[str, int]]
) -> Any:
    """Invokes the formatter registered for the given name.
    :param name: The name of a formatter in the registry
    :param revision: A :class:`.MigrationRevision` instance
    :param options: A dict containing kwargs passed to the
        specified formatter.
    :raises: :class:`alembic.util.CommandError`
    """
    try:
        hook = _registry[name]
    except KeyError as ke:
        raise util.CommandError(
            f"No formatter with name '{name}' registered"
        ) from ke
    else:
        return hook(revision, options)