docs: def cancel_job(self, job_id=None, job_name=None):
          """Cancel a running job.
  
          Args:
              job_id (str, optional): Identifier of job to be canceled.
              job_name (str, optional): Name of job to be canceled.
  
          Returns:
              dict: JSON response for the job cancel operation.
          """
          payload = {}
          if job_name is not None:
              payload['job_name'] = job_name
          if job_id is not None:
              payload['job_id'] = job_id
  
          jobs_url = self._get_url('jobs_path')
          res = self.rest_client.session.delete(jobs_url, params=payload)
          _handle_http_errors(res)
          return res.json()