def register_converter(name=None, klass=None):
    """
    Register a converter with the given name. If a name is not provided, the
    class name will be converted to lowercase and used instead.
    """
    try:
        if issubclass(name, Converter):
            name, klass = None, name
    except __HOLE__:
        pass

    def decorator(klass):
        _name = name if name else klass.__name__.lower()
        CONVERTER_TYPES[_name] = klass
        return klass

    if klass:
        return decorator(klass)
    return decorator
dataset/ETHPy150Open ecdavis/pants/pants/web/application.py/register_converter