class_docstr: TFX bulk inferer executor.
code: def _get_inference_spec(
      self, model_path: str, exec_properties: Dict[str, Any]
  ) -> model_spec_pb2.InferenceSpecType:
      model_spec = bulk_inferrer_pb2.ModelSpec()
      proto_utils.json_to_proto(
          exec_properties[standard_component_specs.MODEL_SPEC_KEY],
          model_spec,
      )
      saved_model_spec = model_spec_pb2.SavedModelSpec(
          model_path=model_path,
          tag=model_spec.tag,
          signature_name=model_spec.model_signature_name,
      )
      result = model_spec_pb2.InferenceSpecType()
      result.saved_model_spec.CopyFrom(saved_model_spec)
      return result
  
imports: import importlib
  import os
  from typing import Any, Callable, Dict, List, Optional, Union
  from absl import logging
  import apache_beam
  import tensorflow
  from tfx import types
  from tfx.components.bulk_inferrer import prediction_to_example_utils
  from tfx.components.util import model_utils
  from tfx.components.util import tfxio_utils
  from tfx.dsl.components.base import base_beam_executor
  from tfx.proto import bulk_inferrer_pb2
  from tfx.proto import example_gen_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_component_specs
  from tfx.utils import io_utils
  from tfx.utils import path_utils
  from tfx.utils import proto_utils
  from tfx_bsl.public.beam import run_inference
  from tfx_bsl.public.proto import model_spec_pb2
  from tfx_bsl.tfxio import record_based_tfxio
  from tensorflow_serving.apis import prediction_log_pb2
label_desc: Use image node_id 2 for calling the Executor obj's underlying member method code with example usage: obj._get_inference_spec(model_path, exec_properties) and returns: result