code: def _handle_response(response):
          
  
          if not str(response.status_code).startswith('2'):
              raise KucoinAPIException(response)
          try:
              res = response.json()
  
              if 'code' in res and res['code'] != "200000":
                  raise KucoinAPIException(response)
  
              if 'success' in res and not res['success']:
                  raise KucoinAPIException(response)
  
              # by default return full response
              # if it's a normal response we have a data attribute, return that
              if 'data' in res:
                  res = res['data']
              return res
          except ValueError:
              raise KucoinRequestException('Invalid Response: %s' % response.text)
docs: Internal helper for handling API responses from the Quoine server.
          Raises the appropriate exceptions when necessary; otherwise, returns the
          response.