code: def _status_change(id, new_status):
      
      job_info = json.loads(r_client.get(id))
      old_status = job_info['status']
      job_info['status'] = new_status
      _deposit_payload(job_info)
  
      return old_status
docs: Update the status of a job
  
      The status associated with the id is updated, an update command is
      issued to the job's pubsub, and and the old status is returned.
  
      Parameters
      ----------
      id : str
          The job ID
      new_status : str
          The status change
  
      Returns
      -------
      str
          The old status