def get(cls, name):
    """Get a registered task function for a given name."""
    try:
        task_func = cls._registry[name]
    except KeyError:
        raise ValueError('{} not found in registry for {}'.format(name, cls
            .__name__))
    else:
        return task_func
