def METHOD_NAME(dataset_root: str, dataset_id: str, app_config: AppConfig):
    data_locator_base_url = app_config.server__data_locator__api_base
    try:
        base_metadata = get_dataset_metadata(dataset_root, dataset_id, app_config)
        collection_id = base_metadata.get("collection_id")
        if collection_id is None:
            return None
        dataset_id = base_metadata["dataset_id"]
        collection_visibility = base_metadata["collection_visibility"]
        suffix = "?visibility=PRIVATE" if collection_visibility == "PRIVATE" else ""
        suffix_for_url = "/private" if collection_visibility == "PRIVATE" else ""
        res = requests.get(f"{data_locator_base_url}/collections/{collection_id}{suffix}")
        if not res.ok:
            log_error_response_from_data_portal(res)
        res_json = res.json()
        web_base_url = app_config.server__app__web_base_url
        metadata = {
            "dataset_name": [dataset["name"] for dataset in res_json["datasets"] if dataset["id"] == dataset_id][0],
            "dataset_id": dataset_id,
            "collection_url": f"{web_base_url}/collections/{collection_id}{suffix_for_url}",
            "collection_name": res_json["name"],
            "collection_description": res_json["description"],
            "collection_contact_email": res_json["contact_email"],
            "collection_contact_name": res_json["contact_name"],
            "collection_links": res_json["links"],
            "collection_datasets": res_json["datasets"],
        }
        if res_json.get("publisher_metadata"):
            metadata["collection_publisher_metadata"] = res_json["publisher_metadata"]
        return metadata
    except Exception as ex:
        raise DatasetMetadataError("Error retrieving dataset metadata") from ex