code: def make_job_object(
      name: str,
      container_image: str,
      command: List[str],
      namespace: str = "default",
      container_name: str = "jobcontainer",
      pod_labels: Optional[Dict[str, str]] = None,
      service_account_name: str = "default",
      ttl_seconds_after_finished: Optional[int] = None,
  ) -> k8s_client.V1Job:
      """Make a Kubernetes Job object with a single pod.
  
      See
      https://kubernetes.io/docs/concepts/workloads/controllers/job/#writing-a-job-spec
  
      Args:
        name: Name of job.
        container_image: Name of container image.
        command: Command to run.
        namespace: Kubernetes namespace to contain this Job.
        container_name: Name of the container.
        pod_labels: Dictionary of metadata labels for the pod.
        service_account_name: Name of the service account for this Job.
        ttl_seconds_after_finished: Interval before automatic deletion of the job
          after completion. If not specified, job is not deleted after completion.
  
      Returns:
        `kubernetes.client.V1Job` object.
      """
      pod_labels = pod_labels or {}
      return k8s_client.V1Job(
          api_version="batch/v1",
          kind="Job",
          metadata=k8s_client.V1ObjectMeta(
              namespace=namespace,
              name=sanitize_pod_name(name),
          ),
          status=k8s_client.V1JobStatus(),
          spec=k8s_client.V1JobSpec(
              ttl_seconds_after_finished=ttl_seconds_after_finished,
              template=k8s_client.V1PodTemplateSpec(
                  metadata=k8s_client.V1ObjectMeta(labels=pod_labels),
                  spec=k8s_client.V1PodSpec(
                      containers=[
                          k8s_client.V1Container(
                              name=container_name,
                              image=container_image,
                              command=command,
                          ),
                      ],
                      service_account_name=service_account_name,
                      restart_policy=RestartPolicy.NEVER.value,
                  ),
              ),
          ),
      )
  
imports: import datetime
  import enum
  import os
  import re
  import time
  from typing import Callable, Dict, List, Optional
  from absl import logging
  from kubernetes import client
  from kubernetes import config
label_desc: Use image node_id 6 for calling a global function with example usage: make_job_object(name, container_image, command, namespace, container_name, pod_labels, service_account_name, ttl_seconds_after_finished) and returns: k8s_client