code: def get_job_client(
      enable_vertex: Optional[bool] = False,
      vertex_region: Optional[str] = None,
  ) -> Union[CAIPJobClient, VertexJobClient]:
      """Gets the job client.
  
      Args:
        enable_vertex: Whether to enable Vertex
        vertex_region: Region for training endpoint in Vertex. Defaults to
          'us-central1'.
  
      Returns:
        The corresponding job client.
      """
      if enable_vertex:
          return VertexJobClient(vertex_region)
      return CAIPJobClient()
  
imports: import abc
  import datetime
  import json
  import random
  from typing import Any, Dict, List, Optional, Union
  from absl import logging
  from google.api_core import retry
  from google.cloud.aiplatform import gapic
  from google.cloud.aiplatform_v1.types.custom_job import CustomJob
  from google.cloud.aiplatform_v1.types.job_state import JobState
  from googleapiclient import discovery
  from tfx import types
  from tfx.types import artifact_utils
  from tfx.utils import telemetry_utils
  from tfx.utils import version_utils
label_desc: Use image node_id 1 for calling a global function with example usage: get_job_client(enable_vertex, vertex_region) and returns: CAIPJobClient, VertexJobClient