async def METHOD_NAME(self, data: dict):
    data = {key: data[key] for key in data if data[key] is not None}
    data["fieldValues"] = [{"field": key, "value": data[key]} for key in data if key.isnumeric()]
    async with HttpClient(
        self.retries,
        [200, 201, 401],
        headers={
            "Accept": "application/json",
            "Content-Type": "application/json",
            "api-token": self.api_key
        }
    ) as client:
        if "email" in data:
            async with client.post(
                url=f"{self.api_url}/api/3/contacts",
                json={"contact": data}
            ) as response:
                if response.status != 201:
                    if (await response.json())['errors'][0]["code"] == "duplicate":
                        contact = (await self.get_contact_by_email(data["email"]))
                        async with client.put(
                            url=f"{self.api_url}/api/3/contacts/{contact['contact']['id']}",
                            json={"contact": {key: data[key] for key in data if key != "email"}}
                        ) as put_response:
                            if put_response.status != 200:
                                raise ActiveCampaignClientException(await put_response.text())
                            return await put_response.json()
                    else:
                        raise ActiveCampaignClientException(await response.text())
                return await response.json()
        elif "id" in data:
            async with client.put(
                    url=f"{self.api_url}/api/3/contacts/{data['id']}",
                    json={"contact": {key: data[key] for key in data}}
            ) as put_response:
                if put_response.status != 200:
                    raise ActiveCampaignClientException(await put_response.text())
                return await put_response.json()
        else:
            raise ActiveCampaignClientException("One of: id, email parameters has to be provided.")