def METHOD_NAME(status: int, json_data) -> dict:
    """
    Produces the expected programmatic output format from a request to the initial_admin endpoint
    """
    # Parse the returned API key if one is provided
    api_key = ""
    if json_data is not None and "api_key" in json_data:
        api_key = json_data["api_key"]
    # Catch unexpected response states and error early
    if status == 200 and api_key == "":
        raise RSConnectException("Connect returned a successful HTTP response but no API key.")
    if status != 200 and api_key != "":
        raise RSConnectException("Connect returned a non-successful HTTP response and an API key. ")
    output = {"status": status, "api_key": api_key}
    # Create a helpful error message
    message = "Unexpected response status."
    if status == 200:
        message = "Success."
    elif status == 401:
        message = "JWT authorization failed."
    elif status == 403:
        message = "Unable to provision initial admin. Please check status of Connect database."
    elif status == 404:
        message = (
            "Unable to find provisioning endpoint. Please check your 'rsconnect bootstrap --server' "
            "parameter and your Connect configuration."
        )
    output["message"] = message
    return output