def METHOD_NAME(self, action="GET", url="", data=None, query_params=None):
    if data is None:
        data = {}
    if query_params is None:
        query_params = {}
    default_headers = {
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Authorization": f"Bearer {self._get_provider_option('auth_token')}",
    }
    request_filter = query_params["filter"] if "filter" in query_params else None
    if request_filter is not None:
        default_headers["X-Filter"] = json.dumps(request_filter)
        del query_params["filter"]
    request_url = f"{self.api_endpoint}{url}"
    response = requests.request(
        action,
        request_url,
        params=query_params,
        data=json.dumps(data),
        headers=default_headers,
    )
    # if the request fails for any reason, throw an error.
    response.raise_for_status()
    if action == "DELETE":
        return ""
    result = response.json()
    return result