code: def get_prediction_client(
      api: Optional[discovery.Resource] = None,
      enable_vertex: Optional[bool] = False,
  ) -> Union[CAIPTfxPredictionClient, VertexPredictionClient]:
      """Gets the job client.
  
      Args:
        api: Google API client resource.
        enable_vertex: Whether to enable Vertex
  
      Returns:
        The corresponding prediction client.
      """
      if enable_vertex:
          return VertexPredictionClient()
      return CAIPTfxPredictionClient(api)
  
imports: import abc
  import sys
  import time
  from typing import Any, Dict, Optional, Union
  from absl import logging
  from google.cloud import aiplatform
  from googleapiclient import discovery
  from googleapiclient import errors
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: get_prediction_client(api, enable_vertex) and returns: CAIPTfxPredictionClient, VertexPredictionClient