code: def _get_input_tensor(
      input_tensors: Union[List[tf.Tensor], Dict[str, tf.Tensor]],
      input_details: Dict[str, Any],
      index: int,
  ) -> tf.Tensor:
      """Returns input tensor in `input_tensors` that maps `input_detail[i]`."""
      if isinstance(input_tensors, dict):
          # Gets the mapped input tensor.
          input_detail = input_details
          for input_tensor_name, input_tensor in input_tensors.items():
              if input_tensor_name in input_detail["name"]:
                  return input_tensor
          raise ValueError(
              "Input tensors don't contains a tensor that mapped the input detail %s"
              % str(input_detail)
          )
      else:
          return input_tensors[index]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tempfile
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
  import numpy
  import tensorflow
  from mediapipe.model_maker.python.core.data import dataset
  from mediapipe.model_maker.python.core.utils import quantization
label_desc: Use image node_id 9 for calling a global function with example usage: _get_input_tensor(input_tensors, input_details, index) and returns: input_tensors, input_tensor