def fetch_manifest_data(registry_head, model_tag, accept):
    """
    Fetch manifest data for a model from a registry.

    Args:
        registry_head: Base URL for the registry API
        model_tag: Tag of the model to fetch
        accept: Accept header for the request

    Returns:
        Manifest data as JSON
    """
    url = f"{registry_head}/manifests/{model_tag}"
    headers = {"Accept": accept}

    logger.debug(f"Fetching manifest data from url {url}")
    request = urllib.request.Request(url, headers=headers)
    with urllib.request.urlopen(request) as response:
        manifest_data = json.load(response)
    return manifest_data

    Fetch manifest data for a model from a registry.

    Args:
        registry_head: Base URL for the registry API
        model_tag: Tag of the model to fetch
        accept: Accept header for the request

    Returns:
        Manifest data as JSON
    
ramalama/ollama_repo_utils.py