code: def _validate_response(response):
          
          try:
              response.raise_for_status()
          except requests.RequestException:
              raise RequestException(
                  code=response.status_code,
                  url=response.url,
                  description=response.text)
          else:
              return response
docs: Return response if ok, raise RequestException if not ok
          :param response: requests.response object
          :return: requests.response object