def _parse_response(self, response):
if not self._raise_errors:<EOL><INDENT>return response<EOL><DEDENT>is_4xx_error = str(response.status_code)[<NUM_LIT:0>] == '<STR_LIT:4>'<EOL>is_5xx_error = str(response.status_code)[<NUM_LIT:0>] == '<STR_LIT:5>'<EOL>content = response.content<EOL>if response.status_code == <NUM_LIT>:<EOL><INDENT>raise AuthenticationError(content)<EOL><DEDENT>elif is_4xx_error:<EOL><INDENT>raise APIError(content)<EOL><DEDENT>elif is_5xx_error:<EOL><INDENT>raise ServerError(content)<EOL><DEDENT>return response<EOL>
Parses the API response and raises appropriate errors if
        raise_errors was set to True