code: def rest_action(self, func, url, **kwargs):
          
          try:
              response = func(url, timeout=self.TIMEOUT, **kwargs)
          except requests.RequestException, err:
              log.exception(
                  "[PyLmod] Error - connection error in "
                  "rest_action, err=%s", err
              )
              raise err
          try:
              return response.json()
          except ValueError, err:
              log.exception('Unable to decode %s', response.content)
              raise err
docs: Routine to do low-level REST operation, with retry.
  
          Args:
              func (callable): API function to call
              url (str): service URL endpoint
              kwargs (dict): addition parameters
  
          Raises:
              requests.RequestException: Exception connection error
              ValueError: Unable to decode response content
  
          Returns:
              list: the json-encoded content of the response