class_docstr: HistogramMseBruteforce for calculating min and max values of calibration result.
class_docstr_tok: ["HistogramMseBruteforce","for","calculating","min","and","max","values","of","calibration","result","."]
docstr: Finds the optimal quant_min and quant_max by testing all possible cases.
  
  It guarantees optimal quant_min and quant_max for the representative
  dataset, but not for the test dataset.
  
  Returns:
    (min_value, max_value): Min and max calculated using
    HistogramMseBruteforce.
docstr_tok: ["Finds","the","optimal","quant_min","and","quant_max","by","testing","all","possible","cases",".","It","guarantees","optimal","quant_min","and","quant_max","for","the","representative","dataset",",","but","not","for","the","test","dataset",".","Returns",":","(","min_value",",","max_value",")",":","Min","and","max","calculated","using","HistogramMseBruteforce","."]
code: def get_min_max_value(self) -> tuple[float, float]:
      """Finds the optimal quant_min and quant_max by testing all possible cases.
  
      It guarantees optimal quant_min and quant_max for the representative
      dataset, but not for the test dataset.
  
      Returns:
        (min_value, max_value): Min and max calculated using
        HistogramMseBruteforce.
      """
      if self._num_bins > 512:
          logging.warning(
              "num_bins=%d is too large. The HISTOGRAM_MSE_BRUTEFORCE method tests"
              " all histogram mid value pairs, so it may take a long time.",
              self._num_bins,
          )
      # Tuple of (mse_error, quant_min, quant_max).
      mse_min = (float("inf"), float("inf"), float("inf"))
  
      # Calculate the error for all hist_mid pairs.
      for left, right in itertools.combinations(
          range(self._num_bins), 2
      ):
          quant_min, quant_max = (
              self._hist_mids[left],
              self._hist_mids[right],
          )
          mse_tuple = self._get_weighted_mean_squared_error(
              quant_min, quant_max
          )
          mse_min = min(mse_tuple, mse_min)
      min_value, max_value = mse_min[1], mse_min[2]
  
      return min_value, 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 1 for calling the _HistogramMseBruteforce obj's underlying member method code with example usage: obj.get_min_max_value() and returns: min_value,  max_value