def _handle_response(self, response):
if not str(response.status_code).startswith('<STR_LIT:2>'):<EOL><INDENT>raise get_api_error(response)<EOL><DEDENT>return response<EOL>
Returns the given response or raises an APIError for non-2xx responses.

        :param requests.Response response: HTTP response
        :returns: requested data
        :rtype: requests.Response
        :raises APIError: for non-2xx responses