def get_repository(name=None):
    """
    Returns the repository with the given name or the default repository if
    :param:`name` is `None`.
    """
    repo_mgr = get_repository_manager()
    if name is None:
        repo = repo_mgr.get_default()
    else:
        repo = repo_mgr.get(name)
    return repo
Returns the repository with the given name or the default repository if
    :param:`name` is `None`.