code: def testBypassAndAverageMinMax(self):
      with self.session():
          pywrap_calibration.clear_calibrator()
          input_tensor1 = array_ops.constant(
              [-50.0, -25.0, 0.0, 25.0, 50.0], dtypes.float32
          )
          aggregator1 = custom_aggregator_op_wrapper.custom_aggregator(
              input_tensor1,
              "6",
              calibration_method=_CalibrationMethod.CALIBRATION_METHOD_AVERAGE_MIN_MAX,
          )
          self.assertAllEqual(
              self.evaluate(aggregator1),
              [-50.0, -25.0, 0.0, 25.0, 50.0],
          )
          input_tensor2 = array_ops.constant(
              [-100.0, -50.0, 0.0, 50.0, 100.0], dtypes.float32
          )
          aggregator2 = custom_aggregator_op_wrapper.custom_aggregator(
              input_tensor2,
              "6",
              calibration_method=_CalibrationMethod.CALIBRATION_METHOD_AVERAGE_MIN_MAX,
          )
          self.assertAllEqual(
              self.evaluate(aggregator2),
              [-100.0, -50.0, 0.0, 50.0, 100.0],
          )
  
          statistics: calib_stat_pb2 = (
              pywrap_calibration.get_statistics_from_calibrator("6")
          )
  
          min_sum = statistics.average_min_max_statistics.min_sum
          max_sum = statistics.average_min_max_statistics.max_sum
          num_samples = (
              statistics.average_min_max_statistics.num_samples
          )
  
          self.assertAllEqual(
              (min_sum, max_sum, num_samples), (-150.0, 150.0, 2)
          )
  
file_path: tensorflow/tensorflow/compiler/mlir/quantization/tensorflow/calibrator/integration_test/custom_aggregator_op_test.py
imports: import tensorflow
  from tensorflow.compiler.mlir.quantization.tensorflow import quantization_options_pb2
  from tensorflow.compiler.mlir.quantization.tensorflow.calibrator import calibration_statistics_pb2
  from tensorflow.compiler.mlir.quantization.tensorflow.calibrator import custom_aggregator_op_wrapper
  from tensorflow.compiler.mlir.quantization.tensorflow.calibrator import pywrap_calibration
  from tensorflow.python import pywrap_tensorflow
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 5 for calling the CustomAggregatorTest obj's underlying member method code with example usage: obj.testBypassAndAverageMinMax() without return types