code: def _run_static_range_ptq(
      src_saved_model_path: str,
      dst_saved_model_path: str,
      quant_opts: _QuantizationOptions,
      representative_dataset: repr_dataset.RepresentativeDatasetOrMapping,
      signature_def_map: _SignatureDefMap,
  ) -> None:
      """Runs static-range Post-Training Quantization.
  
      Runs static-range PTQ for the model. Runs the calibration step with
      `representative_dataset` to collect statistics required for quantization. This
      produces the quantized GraphDef along with the SignatureDefs which might have
      been modified according to the changes in the graph.
  
      Args:
        src_saved_model_path: Path to the source SavedModel directory.
        dst_saved_model_path: Path to the destination SavedModel directory.
        quant_opts: Quantization options.
        representative_dataset: Representative dataset used for the calibration
          step. Representative datasets should exist for each signature def key in
          `signature_def_keys`.
        signature_def_map: Signature def key -> SignatureDef mapping.
  
      Raises:
        ValueError if the graph doesn't contain a valid signature.
      """
      logging.info("Running static-range post-training quantization.")
  
      loader = saved_model_loader.SavedModelLoader(src_saved_model_path)
      function_aliases = loader.get_meta_graph_def_from_tags(
          quant_opts.tags
      ).meta_info_def.function_aliases
  
      signature_def_map_serialized = _serialize_signature_def_map(
          signature_def_map
      )
      pywrap_quantize_model.quantize_ptq_static_range(
          src_saved_model_path,
          dst_saved_model_path,
          quantization_options_serialized=quant_opts.SerializeToString(),
          signature_keys=list(quant_opts.signature_keys),
          signature_def_map_serialized=signature_def_map_serialized,
          function_aliases=dict(function_aliases),
          py_function_library=py_function_lib.PyFunctionLibrary(),
          representative_dataset=representative_dataset,
      )
  
imports: import tempfile
  from typing import Mapping, Optional
  from absl import logging
  from tensorflow.compiler.mlir.quantization.tensorflow import quantization_options_pb2
  from tensorflow.compiler.mlir.quantization.tensorflow.python import py_function_lib
  from tensorflow.compiler.mlir.quantization.tensorflow.python import pywrap_quantize_model
  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.python.lib.io import file_io
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import loader_impl
  from tensorflow.python.saved_model import signature_constants
  from tensorflow.python.saved_model import tag_constants
  from tensorflow.python.trackable import autotrackable
  from tensorflow.python.util import tf_export
label_desc: Use image node_id 4 for calling a global function with example usage: _run_static_range_ptq(src_saved_model_path, dst_saved_model_path, quant_opts, representative_dataset, signature_def_map) without return types