class_docstr: A Kubernetes job runner that launches and executes pipeline components in kubernetes cluster.
docstr: Wait for the pod to be created and runnable.
docstr_tok: ["Wait","for","the","pod","to","be","created","and","runnable","."]
code: def _wait_until_pod_is_runnable(self) -> None:
      """Wait for the pod to be created and runnable."""
  
      assert self._job_name, "You should first create a job to run."
      orchestrator_pods = []
      start_time = datetime.datetime.utcnow()
      # Wait for the kubernetes job to launch a pod.
      while (
          datetime.datetime.utcnow() - start_time
      ).seconds < _JOB_CREATION_TIMEOUT:
          orchestrator_pods = self._k8s_core_api.list_namespaced_pod(
              namespace="default",
              label_selector="job-name={}".format(self._job_name),
          ).items
          try:
              orchestrator_pods = (
                  self._k8s_core_api.list_namespaced_pod(
                      namespace="default",
                      label_selector="job-name={}".format(
                          self._job_name
                      ),
                  ).items
              )
          except k8s_client.rest.ApiException as e:
              if e.status != 404:
                  raise e
              time.sleep(_DEFAULT_POLLING_INTERVAL_SEC)
          if len(orchestrator_pods) != 1:
              continue
          pod = orchestrator_pods.pop()
          pod_phase = kube_utils.PodPhase(pod.status.phase)
          if (
              pod_phase == kube_utils.PodPhase.RUNNING
              and pod.status.pod_ip
          ):
              self._pod_name = pod.metadata.name
              logging.info("Pod created with name %s", self._pod_name)
              return
          if pod_phase.is_done:
              raise JobExceptionError(
                  message="Job has been aborted. Please restart for execution."
              )
          time.sleep(_DEFAULT_POLLING_INTERVAL_SEC)
      raise JobExceptionError(
          message="Deadline exceeded while waiting for pod to be running."
      )
  
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 4 for calling the KubernetesJobRunner obj's underlying member method code with example usage: obj._wait_until_pod_is_runnable() without return types