code: def test_expected_calibration_error_uncalibrated(
      self, num_bins, nclasses, nsamples
  ):
      logits, labels = self._generate_random_calibration_logits(
          nsamples, nclasses
      )
      ece = self.evaluate(
          calibration.expected_calibration_error(
              num_bins, logits=logits, labels_true=labels
          )
      )
  
      logging.info(
          "ECE (uncalibrated), num_bins=%d  nclasses=%d  "
          "nsamples=%d  ECE %.4f",
          num_bins,
          nclasses,
          nsamples,
          ece,
      )
  
      ece_lower = 0.2
      self.assertGreater(
          ece,
          ece_lower,
          msg="Expected calibration error (ECE) computed at %.4f "
          "for well-calibrated predictions is smaller than "
          "minimum ECE of %.4f." % (ece, ece_lower),
      )
  
imports: import itertools
  from absl import logging
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.stats import calibration
label_desc: Use image node_id 10 for calling the CalibrationTest obj's underlying member method code with example usage: obj.test_expected_calibration_error_uncalibrated(num_bins, nclasses, nsamples) without return types