code: def _perform_update(self, method, resource, payload):
          '''
          Execute the update task.
          '''
  
          # python2/3 compatibility wizardry
          try:
              file_type = file
          except NameError:
              file_type = IOBase
  
          if isinstance(payload, (dict, list)):
              response = self._perform_request(method, resource,
                                               data=json.dumps(payload))
          elif isinstance(payload, file_type):
              headers = {
                  "content-type": "text/csv",
              }
              response = self._perform_request(method, resource, data=payload,
                                               headers=headers)
          else:
              raise Exception("Unrecognized payload {0}. Currently only list-, dictionary-,"
                              " and file-types are supported.".format(type(payload)))
  
          return responsf _perform_update(self, method, resource, payload):
          '''
          Execute the update task.
          '''
  
          # python2/3 compatibility wizardry
          try:
              file_type = file
          except NameError:
              file_type = IOBase
  
          if isinstance(payload, (dict, list)):
              response = self._perform_request(method, resource,
                                               data=json.dumps(payload))
          elif isinstance(payload, file_type):
              headers = {
                  "content-type": "text/csv",
              }
              response = self._perform_request(method, resource, data=payload,
                                               headers=headers)
          else:
              raise Exception("Unrecognized payload {0}. Currently only list-, dictionary-,"
                              " and file-types are supported.".format(type(payload)))
  
          return response
docs: Execute the update task.