def invoke(self, method, relpath=None, params=None, data=None, headers=None, files=None, allow_redirects=False):
    """
    Invoke an API method.
    @return: Raw body or JSON dictionary (if response content type is JSON).
    """
    path = self._join_uri(relpath)
    resp = self._client.execute(method,
                                path,
                                params=params,
                                data=data,
                                headers=headers,
                                files=files,
                                allow_redirects=allow_redirects,
                                urlencode=self._urlencode)

    if self._client.logger.isEnabledFor(logging.DEBUG):
      self._client.logger.debug(
          "%s Got response: %s%s" %
          (method,
           smart_unicode(resp.content[:32], errors='replace'),
           32 > len(resp.content) and "..." or ""))

    return self._format_response(resp)
dataset/ETHPy150Open cloudera/hue/desktop/core/src/desktop/lib/rest/resource.py/Resource.invoke/swapped operands of `>`