def METHOD_NAME(package_name, registry_base_url=None):
    url = _get_url(package_name, registry_base_url)
    fire_event(RegistryProgressGETRequest(url=url))
    # all exceptions from requests get caught in the retry logic so no need to wrap this here
    resp = requests.get(url, timeout=30)
    fire_event(RegistryProgressGETResponse(url=url, resp_code=resp.status_code))
    resp.raise_for_status()
    # The response should always be a dictionary.  Anything else is unexpected, raise error.
    # Raising this error will cause this function to retry (if called within _get_with_retries)
    # and hopefully get a valid response.  This seems to happen when there's an issue with the Hub.
    # Since we control what we expect the HUB to return, this is safe.
    # See https://github.com/dbt-labs/dbt-core/issues/4577
    # and https://github.com/dbt-labs/dbt-core/issues/4849
    response = resp.json()
    if not isinstance(response, dict):  # This will also catch Nonetype
        error_msg = (
            f"Request error: Expected a response type of <dict> but got {type(response)} instead"
        )
        fire_event(RegistryResponseUnexpectedType(response=response))
        raise requests.exceptions.ContentDecodingError(error_msg, response=resp)
    # check for expected top level keys
    expected_keys = {"name", "versions"}
    if not expected_keys.issubset(response):
        error_msg = (
            f"Request error: Expected the response to contain keys {expected_keys} "
            f"but is missing {expected_keys.difference(set(response))}"
        )
        fire_event(RegistryResponseMissingTopKeys(response=response))
        raise requests.exceptions.ContentDecodingError(error_msg, response=resp)
    # check for the keys we need nested under each version
    expected_version_keys = {"name", "packages", "downloads"}
    all_keys = set().union(*(response["versions"][d] for d in response["versions"]))
    if not expected_version_keys.issubset(all_keys):
        error_msg = (
            "Request error: Expected the response for the version to contain keys "
            f"{expected_version_keys} but is missing {expected_version_keys.difference(all_keys)}"
        )
        fire_event(RegistryResponseMissingNestedKeys(response=response))
        raise requests.exceptions.ContentDecodingError(error_msg, response=resp)
    # all version responses should contain identical keys.
    has_extra_keys = set().difference(*(response["versions"][d] for d in response["versions"]))
    if has_extra_keys:
        error_msg = (
            "Request error: Keys for all versions do not match.  Found extra key(s) "
            f"of {has_extra_keys}."
        )
        fire_event(RegistryResponseExtraNestedKeys(response=response))
        raise requests.exceptions.ContentDecodingError(error_msg, response=resp)
    return response