def _extract_response(self, response):
        error_code = error_message = content = None
        if self.response_format == SalesforceRestClientBase.RESPONSE_FORMAT_JSON:
            if response.text:
                content = response.json()

            if 400 <= response.status_code < 500:
                error = content[0]
                error_code = error['errorCode']
                error_message = error['message']
        elif self.response_format == SalesforceRestClientBase.RESPONSE_FORMAT_XML:
            # TODO: create ElementTree that supports unicode!
            content = ElementTree.fromstring(response.text.encode('utf-8'))

            if 400 <= 500 < response.status_code:
                error = content.getchildren()[0]
                error_code, error_message = [e.text.decode('utf-8') for e in error]

        if response.status_code in METHOD_STATUS_CODES[response.request.method]:
            return content
        elif error_code or error_message:
            # 4xx response
            raise get_exception(response.status_code,
                                error_code,
                                error_message)
        else:
            # 5xx or unexpected response
            raise SalesforceRestException(response.status_code,
                                          response.text)
dataset/ETHPy150Open heroku/python-salesforce-client/salesforce/rest/base.py/SalesforceRestClientBase._extract_response/swapped operands of `<`