code: def _convert_values_to_tf_tensors(
      sample: rd.RepresentativeSample,
  ) -> Mapping[str, core.Tensor]:
      """Converts TensorLike values of `sample` to Tensors.
  
      Creates a copy of `sample`, where each value is converted to Tensors
      unless it is already a Tensor.
      The values are not converted in-place (i.e. `sample` is not mutated).
  
      Args:
        sample: A representative sample, which is a map of {name -> tensorlike
          value}.
  
      Returns:
        Converted map of {name -> tensor}.
      """
      tensor_mapping = {}
      for name, tensorlike_value in sample.items():
          if isinstance(tensorlike_value, core.Tensor):
              tensor_value = tensorlike_value
          else:
              tensor_value = (
                  tensor_conversion.convert_to_tensor_v2_with_dispatch(
                      tensorlike_value
                  )
              )
  
          tensor_mapping[name] = tensor_value
  
      return tensor_mapping
  
imports: from collections.abc import Callable, Collection, Mapping, Sequence
  from typing import Optional
  from absl import logging
  from tensorflow.compiler.mlir.quantization.tensorflow import exported_model_pb2
  from tensorflow.compiler.mlir.quantization.tensorflow import quantization_options_pb2
  from tensorflow.compiler.mlir.quantization.tensorflow.calibrator import calibration_algorithm
  from tensorflow.compiler.mlir.quantization.tensorflow.calibrator import calibration_statistics_pb2
  from tensorflow.compiler.mlir.quantization.tensorflow.calibrator import pywrap_calibration
  from tensorflow.compiler.mlir.quantization.tensorflow.python import pywrap_function_lib
  from tensorflow.compiler.mlir.quantization.tensorflow.python import representative_dataset
  from tensorflow.compiler.mlir.quantization.tensorflow.python import save_model
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.core.protobuf import saver_pb2
  from tensorflow.python.client import session
  from tensorflow.python.eager import context
  from tensorflow.python.eager import wrap_function
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_conversion
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import loader_impl
  from tensorflow.python.trackable import autotrackable
  from tensorflow.python.types import core
label_desc: Use image node_id 9 for calling a global function with example usage: _convert_values_to_tf_tensors(sample) and returns: tensor_mapping