code: def cancel(self, job_id):
          
          try:
              confirmation = self.send(self.api_url + job_id, http_method="DELETE")
          except CartoException as e:
              if 'Cannot set status from done to cancelled' in e.args[0].args[0]:
                  return 'done'
              else:
                  raise e
          return confirmation['status']
docs: Cancels a job
  
          :param job_id: The id of the job to be cancelled
          :type job_id: str
  
          :return: A status code depending on whether the cancel request was
                      successful
          :rtype: str
  
          :raise CartoException: