human
I wrote the below code

    if (base_class not in _REGISTRY):
        _REGISTRY[base_class] = {}
    registry = _REGISTRY[base_class]
    def register(klass, name=None):
        'Register    functions'
        assert issubclass(klass, base_class), ('Can    only    register    subclass    of    %s' % base_class.__name__)
        if (name is None):
            name = klass.__name__.lower()
        if (name in registry):
            warnings.warn(('\x1b[91mNew    %s    %s.%s    registered    with    name    %s    isoverriding    existing    %s    %s.%s\x1b[0m' % (nickname, klass.__module__, klass.__name__, name, nickname, registry[name].__module__, registry[name].__name__)), UserWarning, stacklevel=2)
        registry[name] = klass
        return klass
    register.__doc__ = ('Register    %s    to    the    %s    factory' % (nickname, nickname))
    return register

What's a good function header?
assistant
#Here's a good function header.

def get_register_func(base_class, nickname):