code: def _populate_calibration_options(
      quantization_options: quant_opts_pb2.QuantizationOptions,
  ):
      """Populates default values for CalibrationOptions.
  
      Args:
        quantization_options: An instance of QuantizationOptions with a field
          specifying CalibrationOptions
      """
  
      calib_opts = quantization_options.calibration_options
      if (
          calib_opts.calibration_method
          == _CalibrationMethod.CALIBRATION_METHOD_UNSPECIFIED
      ):
          calib_opts.calibration_method = (
              _CalibrationMethod.CALIBRATION_METHOD_MIN_MAX
          )
      elif (
          calib_opts.calibration_method
          == _CalibrationMethod.CALIBRATION_METHOD_HISTOGRAM_PERCENTILE
      ):
          if not calib_opts.calibration_parameters.initial_num_bins:
              calib_opts.calibration_parameters.initial_num_bins = 256
          if not calib_opts.calibration_parameters.min_percentile:
              calib_opts.calibration_parameters.min_percentile = 0.001
          if not calib_opts.calibration_parameters.max_percentile:
              calib_opts.calibration_parameters.max_percentile = 99.999
      # Check the activation_tensor_type of HISTOGRAM_MSE methods.
      elif calib_opts.calibration_method in [
          _CalibrationMethod.CALIBRATION_METHOD_HISTOGRAM_MSE_BRUTEFORCE,
          _CalibrationMethod.CALIBRATION_METHOD_HISTOGRAM_MSE_MAX_FREQUENCY,
          _CalibrationMethod.CALIBRATION_METHOD_HISTOGRAM_MSE_SYMMETRIC,
      ]:
          activation_tensor_type = quantization_options.quantization_method.quantization_component_specs[
              _QuantizationComponent.COMPONENT_ACTIVATION
          ].tensor_type
          # Unlike the HISTOGRAM_PERCENTILE method, the HISTOGRAM_MSE method uses
          # num_bits because it actually quantizes and dequantizes values.
          if activation_tensor_type != _TensorType.TENSORTYPE_INT_8:
              raise ValueError(
                  "Only TENSORTYPE_INT_8 is supported for HISTOGRAM_MSE calibration"
                  f" methods. calibration_method={calib_opts.calibration_method}"
              )
  
          if not calib_opts.calibration_parameters.initial_num_bins:
              calib_opts.calibration_parameters.initial_num_bins = 256
  
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 11 for calling a global function with example usage: _populate_calibration_options(quantization_options) without return types