code: def _create_inference_input_tuple(
      extracts: types.Extracts,
  ) -> Tuple[types.Extracts, bytes]:
      """Creates a tuple containing the Extracts and input to the model."""
      try:
          # Note after split_extracts splits the Extracts batch, INPUT_KEY has a value
          # that is a 0 dimensional np.array. These arrays are indexed using the [()]
          # syntax.
          model_input = extracts[constants.INPUT_KEY][()]
      except KeyError as e:
          raise ValueError(
              f'Extracts must contain the input keyed by "{constants.INPUT_KEY}" for '
              "inference."
          ) from e
      if not isinstance(model_input, bytes):
          raise ValueError(
              f'Extracts value at key: "{constants.INPUT_KEY}" is not of '
              "type bytes. Only serialized tf.Examples and serialized "
              "tf.SequenceExamples are currently supported. The value "
              f"is {model_input} and type {type(model_input)}."
          )
      return (extracts, model_input)
  
file_path: model-analysis/tensorflow_model_analysis/extractors/inference_base.py
imports: from typing import Dict, Optional, Sequence, Tuple, Union
  from absl import logging
  import apache_beam
  import numpy
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.utils import model_util
  from tensorflow_model_analysis.utils import util
  from tensorflow.python.saved_model import loader_impl
  from tensorflow_serving.apis import prediction_log_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: _create_inference_input_tuple(extracts) and returns: extracts,  model_input