Get a given converter by name, or raise an exception.

def converter(type_name):
    """Get a given converter by name, or raise an exception."""
    converter = TYPES.get(type_name)
    if converter is None:
        raise ConverterError('Unknown converter: %r' % type_name)
    return converter()