code: def test_histogram_calibration_methods(self, calibration_options):
      statistics = calib_stats_pb2.CalibrationStatistics()
      statistics.histogram_statistics.lower_bound = 0.0
      statistics.histogram_statistics.bin_width = 1.0
  
      hist_freq = np.zeros(501, dtype=np.int32)
  
      # Advanced calibration methods that use histograms detect outliers, so they
      # don't use the outliers as min/max values.
      hist_freq[0] = 1
      hist_freq[-1] = 1
  
      # The majority of the data exists around the center.
      hist_freq[250] = 1000
      for i in range(1, 201):
          hist_freq[250 - i] = 1000 - i
          hist_freq[250 + i] = 1000 - i
  
      statistics.histogram_statistics.hist_freq.extend(
          hist_freq.tolist()
      )
  
      # Histogram calibration methods should remove outliers.
      min_value, max_value = calibration_algorithm.get_min_max_value(
          statistics, calibration_options
      )
  
      # Since the min/max values may differ slightly for each calibration method,
      # also check the nearby values.
      self.assertAllInRange(min_value, 49, 51)
      self.assertAllInRange(max_value, 449, 451)
  
file_path: tensorflow/tensorflow/compiler/mlir/quantization/tensorflow/calibrator/calibration_algorithm_test.py
imports: from absl.testing import parameterized
  import numpy
  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.python.platform import test
label_desc: Use image node_id 3 for calling the CalibrationAlgorithmTest obj's underlying member method code with example usage: obj.test_histogram_calibration_methods(calibration_options) without return types