def create_registry(
    *namespace: str,
    generic_type: type[S],
    entry_points: bool = False,
    description: str = '',
) -> 'TypedRegistry[S]':
    """Create a new registry.

    Args:
        namespace (str): The namespace, e.g. "llmfoundry.loggers"
        generic_type (Type[S]): The type of the registry.
        entry_points (bool): Accept registered functions from entry points.
        description (str): A description of the registry.

    Returns:
        The TypedRegistry object.
    """
    if catalogue.check_exists(*namespace):
        raise catalogue.RegistryError(f'Namespace already exists: {namespace}')

    return TypedRegistry[generic_type](
        namespace,
        entry_points=entry_points,
        description=description,
    )
Create a new registry.

    Args:
        namespace (str): The namespace, e.g. "llmfoundry.loggers"
        generic_type (Type[S]): The type of the registry.
        entry_points (bool): Accept registered functions from entry points.
        description (str): A description of the registry.

    Returns:
        The TypedRegistry object.
    
llmfoundry/utils/registry_utils.py