def METHOD_NAME():
    for url in API_URLS:
        if "staging.eu" in url:
            # staging eu
            token = SCALYR_TOKEN_STAGING_EU
        elif "eu" in url:
            # prod eu
            token = SCALYR_TOKEN_PROD_EU
        else:
            # prod us
            token = SCALYR_TOKEN_PROD_US
        # 1. Test unauthenticated scenario (aka invalid / missing API key)
        print("Using url: %s" % (url))
        print("Unauthenticated checks (expecting status code 401)")
        print("")
        # Looks like logstaging.eu stopped returning Connection header at some point so for now we
        # just skip this check
        if "staging.eu" in url:
            expected_headers_401 = EXPECTED_HEADER_NAMES_401.copy()
            expected_headers_400 = EXPECTED_HEADER_NAMES_401.copy()
            expected_headers_200 = EXPECTED_HEADER_NAMES_200.copy()
            expected_headers_401.remove("Connection")
            expected_headers_400.remove("Connection")
            expected_headers_200.remove("Connection")
            expected_headers_200.remove("Cache-Control")
        else:
            expected_headers_401 = EXPECTED_HEADER_NAMES_401
            expected_headers_400 = EXPECTED_HEADER_NAMES_401
            expected_headers_200 = EXPECTED_HEADER_NAMES_200
        verify_api_response_headers_and_status_code(
            url=url,
            data="{}",
            expected_status_code=401,
            expected_headers=expected_headers_401,
        )
        # 2. Test authenticated scenario with a valid API key and invalid payload
        print("")
        print("Authenticated checks (expecting status code 400)")
        print("")
        data = BASE_BODY.copy()
        data["token"] = token
        del data["events"]
        del data["session"]
        verify_api_response_headers_and_status_code(
            url=url,
            data=json.dumps(data),
            expected_status_code=400,
            expected_headers=expected_headers_400,
        )
        # 2. Test authenticated scenario with a valid API key and valid payload
        print("Authenticated checks (expecting status code 200)")
        print("")
        data = BASE_BODY.copy()
        data["token"] = token
        verify_api_response_headers_and_status_code(
            url=url,
            data=json.dumps(data),
            expected_status_code=200,
            expected_headers=expected_headers_200,
        )