class_docstr: A Kubernetes job runner that launches and executes pipeline components in kubernetes cluster.
docstr: Execute component in the pod.
docstr_tok: ["Execute","component","in","the","pod","."]
code: def run(
      self, execution_info, executable_spec
  ) -> task_scheduler.TaskSchedulerResult:
      """Execute component in the pod."""
  
      try:
          self._create_job(execution_info, executable_spec)
          self._wait_until_pod_is_runnable()
          if self._stream_pod_logs:
              self._stream_logs()
          self._wait_until_completion()
          return task_scheduler.TaskSchedulerResult(
              status=status_lib.Status(code=status_lib.Code.OK),
              output=task_scheduler.ExecutorNodeOutput(),
          )
      except k8s_client.rest.ApiException as e:
          # TODO(b/240237394): Error type specification.
          msg = "Unable to run job. \nReason: %s\nBody: %s" % (
              e.reason if not None else "",
              e.body if not None else "",
          )
          logging.info(msg)
          return task_scheduler.TaskSchedulerResult(
              status=status_lib.Status(
                  code=status_lib.Code.CANCELLED, message=msg
              )
          )
      except JobExceptionError as e:
          logging.info(e.msg)
          return task_scheduler.TaskSchedulerResult(
              status=status_lib.Status(
                  code=status_lib.Code.CANCELLED, message=e.msg
              )
          )
  
imports: import abc
  import datetime
  import random
  import string
  import time
  from absl import logging
  from kubernetes import client
  from tfx.orchestration.experimental.core import task_scheduler
  from tfx.orchestration.python_execution_binary import python_execution_binary_utils
  from tfx.utils import kube_utils
  from tfx.utils import status
label_desc: Use image node_id 2 for calling the KubernetesJobRunner obj's underlying member method code with example usage: obj.run(execution_info, executable_spec) and returns: task_scheduler, task_scheduler, task_scheduler