def METHOD_NAME(self, action="GET", url="/", data=None, query_params=None):
    if data is None:
        data = {}
    data["login_token"] = (
        self._get_provider_option("auth_username")
        + ","
        + self._get_provider_option("auth_token")
    )
    data["format"] = "json"
    if query_params:
        query_string = "?" + urlencode(query_params)
    else:
        query_string = ""
        query_params = {}
    if data:
        data = json.dumps(data)
    else:
        data = ""
    date = time.strftime("%a %b %d %H:%M:%S %Y", time.localtime())
    default_headers = {
        "API-KEY": self._get_provider_option("auth_username"),
        "API-REQUEST-DATE": date,
        "API-HMAC": hashlib.md5(
            f"{self._get_provider_option('auth_username')}{self.api_endpoint}{url}{query_string}{data}{date}{self._get_provider_option('auth_token')}".encode(
                "utf-8"
            )
        ).hexdigest(),
        "API-FORMAT": "json",
    }
    default_auth = None
    response = requests.request(
        action,
        self.api_endpoint + url,
        params=query_params,
        data=data,
        headers=default_headers,
        auth=default_auth,
    )
    # if the request fails for any reason, throw an error.
    response.raise_for_status()
    return response.json()