def METHOD_NAME(self, res: requests.Response):
    if res.status_code != 200:
        raise Exception(
            "Received invalid response with exit code: {}, reason: {}".format(
                res.status_code, res.reason
            )
        )
    return json.loads(res.text)