code: def test_multidim_and_axis(self):
      label = tf.cast(
          [[0, 0, 1, 0, 1, 1], [0, 0, 1, 0, 1, 1]], dtype=tf.bool
      )
      log_pred = tf.math.log(
          [
              [0.1, 0.05, 0.5, 0.2, 0.99, 0.99],
              [0.1, 0.05, 0.5, 0.2, 0.99, 0.99],
          ]
      )
      ece, acc, conf, cnt, edges, buckets = self.evaluate(
          calibration.expected_calibration_error_quantiles(
              label, log_pred, num_buckets=3, axis=1
          )
      )
      self.assertAllClose([0.145, 0.145], ece, rtol=1e-6, atol=1e-6)
      self.assertAllClose(
          np.transpose([[0.0, 0.0, 1.0], [0.0, 0.0, 1.0]]),
          acc,
          rtol=1e-6,
          atol=1e-6,
      )
      self.assertAllClose(
          np.transpose(
              [[0.075, 0.2, 0.826667], [0.075, 0.2, 0.826667]]
          ),
          conf,
          rtol=1e-6,
          atol=0.0,
      )
      self.assertAllClose(
          np.transpose([[2.0, 1.0, 3.0], [2.0, 1.0, 3.0]]),
          cnt,
          rtol=1e-6,
          atol=0.0,
      )
      self.assertAllClose(
          tf.math.log(
              tf.transpose(
                  [[0.05, 0.2, 0.5, 0.99], [0.05, 0.2, 0.5, 0.99]]
              )
          ),
          edges,
          rtol=1e-6,
          atol=0.0,
      )
      self.assertAllEqual(
          [[0, 0, 2, 1, 2, 2], [0, 0, 2, 1, 2, 2]], buckets
      )
  
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 3 for calling the ExpectedCalibrationErrorQuantiles obj's underlying member method code with example usage: obj.test_multidim_and_axis() without return types