def METHOD_NAME(query, variables):
    try:
        response = requests.post(
            settings.PLAIN_API,
            json={"query": query, "variables": variables},
            headers={"Authorization": f"Bearer {settings.PLAIN_API_TOKEN}"},
        )
        response.raise_for_status()
        data = response.json()
        return data["data"]
    except requests.exceptions.HTTPError as e:
        data = e.response.json()
        raise PlainError(data["errors"][0]["message"]) from e