class_docstr: Instance of SubmittedRun corresponding to a Kubernetes Job run launched to run an MLflow
  project.
  :param mlflow_run_id: ID of the MLflow project run.
  :param job_name: Kubernetes job name.
  :param job_namespace: Kubernetes job namespace.
class_docstr_tok: ["Instance","of","SubmittedRun","corresponding","to","a","Kubernetes","Job","run","launched","to","run","an","MLflow","project",".",":","param","mlflow_run_id",":","ID","of","the","MLflow","project","run",".",":","param","job_name",":","Kubernetes","job","name",".",":","param","job_namespace",":","Kubernetes","job","namespace","."]
code: def cancel(self):
      with self._status_lock:
          if not RunStatus.is_terminated(self._status):
              _logger.info("Cancelling job.")
              self._kube_api.delete_namespaced_job(
                  name=self._job_name,
                  namespace=self._job_namespace,
                  body=kubernetes.client.V1DeleteOptions(),
                  pretty=True,
              )
              self._status = RunStatus.KILLED
              _logger.info("Job cancelled.")
          else:
              _logger.info(
                  "Attempting to cancel a job that is already terminated."
              )
  
imports: import logging
  import os
  import time
  from datetime import datetime
  from shlex import quote, split
  from threading import RLock
  import kubernetes
  from kubernetes.config.config_exception import ConfigException
  import docker
  from mlflow.entities import RunStatus
  from mlflow.exceptions import ExecutionException
  from mlflow.projects.submitted_run import SubmittedRun
label_desc: Use image node_id 6 for calling the KubernetesSubmittedRun obj's underlying member method code with example usage: obj.cancel() without return types