code: def _get_container_or_error(
      pod: k8s_client.V1Pod, container_name: str
  ) -> k8s_client.V1Container:
      for container in pod.spec.containers:
          if container.name == container_name:
              return container
      raise ValueError(
          "Unable to find {} container from the pod (found {}).".format(
              container_name, [c.name for c in pod.spec.containers]
          )
      )
  
imports: import datetime
  import os
  import time
  from typing import Optional
  from absl import logging
  from apache_beam.utils import retry
  from kubernetes import client
  from kubernetes.client import rest
  from tfx.components.infra_validator import error_types
  from tfx.components.infra_validator import serving_bins
  from tfx.components.infra_validator.model_server_runners import base_runner
  from tfx.proto import infra_validator_pb2
  from tfx.utils import kube_utils
label_desc: Use image node_id 2 for calling a global function with example usage: _get_container_or_error(pod, container_name) and returns: container