code: def get_min_max_value(
      statistics: calib_stats_pb2.CalibrationStatistics,
      calib_opts: quant_opts_pb2.CalibrationOptions,
  ) -> tuple[float, float]:
      """Calculates min and max from statistics using calibration options.
  
      Args:
        statistics: Collected calibration statistics.
        calib_opts: Calibration options used for calculating min and max.
  
      Returns:
        (min_value, max_value): Min and max calculated using calib_opts.
  
      Raises:
        ValueError: Unsupported calibration method is given.
      """
      calib_method = calib_opts.calibration_method
      if calib_method not in _REGISTRY:
          raise ValueError(
              f"Unsupported calibration method: {calib_method}"
          )
  
      calibration_algorithm = _REGISTRY[calib_method](
          statistics, calib_opts
      )
      return calibration_algorithm.get_min_max_value()
  
imports: import abc
  import itertools
  import logging
  import numpy
  from tensorflow.compiler.mlir.quantization.tensorflow import quantization_options_pb2
  from tensorflow.compiler.mlir.quantization.tensorflow.calibrator import calibration_statistics_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: get_min_max_value(statistics, calib_opts) and returns: calibration_algorithm