def METHOD_NAME(self, mode: str) -> Callable:
    """Retrieve the function corresponding to the given run mode."""
    try:
        return getattr(self, mode)
    except AttributeError:
        raise ValueError(f"{type(self).__name__} has no run mode '{mode}'.")