code: def testCalculateConfidenceIntervalConfusionMatrices(self):
      mid, lb, ub = math_util.calculate_confidence_interval(
          types.ValueWithTDistribution(
              sample_mean=binary_confusion_matrices.Matrices(
                  thresholds=[0.5],
                  tp=[0.0],
                  tn=[2.0],
                  fp=[1.0],
                  fn=[1.0],
              ),
              sample_standard_deviation=binary_confusion_matrices.Matrices(
                  thresholds=[0.5],
                  tp=[0.0],
                  tn=[2.051956704170308],
                  fp=[1.025978352085154],
                  fn=[1.2139539573337679],
              ),
              sample_degrees_of_freedom=19,
              unsampled_value=binary_confusion_matrices.Matrices(
                  thresholds=[0.5],
                  tp=[0.0],
                  tn=[2.0],
                  fp=[1.0],
                  fn=[1.0],
              ),
          )
      )
  
      expected_mid = binary_confusion_matrices.Matrices(
          thresholds=[0.5], tp=[0.0], tn=[2.0], fp=[1.0], fn=[1.0]
      )
      self.assertEqual(expected_mid, mid)
  
      expected_lb = binary_confusion_matrices.Matrices(
          thresholds=[0.5],
          tp=[0.0],
          tn=[-2.2947947404327547],
          fp=[-1.1473973702163773],
          fn=[-1.5408348336436783],
      )
      self.assertEqual(expected_lb.thresholds, lb.thresholds)
      np.testing.assert_almost_equal(lb.tp, expected_lb.tp)
      np.testing.assert_almost_equal(lb.fp, expected_lb.fp)
      np.testing.assert_almost_equal(lb.tn, expected_lb.tn)
      np.testing.assert_almost_equal(lb.fn, expected_lb.fn)
  
      expected_ub = binary_confusion_matrices.Matrices(
          thresholds=[0.5],
          tp=[0.0],
          tn=[6.294794740432755],
          fp=[3.1473973702163773],
          fn=[3.5408348336436783],
      )
      self.assertEqual(expected_ub.thresholds, ub.thresholds)
      np.testing.assert_almost_equal(ub.tp, expected_ub.tp)
      np.testing.assert_almost_equal(ub.fp, expected_ub.fp)
      np.testing.assert_almost_equal(ub.tn, expected_ub.tn)
      np.testing.assert_almost_equal(ub.fn, expected_ub.fn)
  
file_path: model-analysis/tensorflow_model_analysis/utils/math_util_test.py
imports: import math
  import numpy
  import tensorflow
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.metrics import binary_confusion_matrices
  from tensorflow_model_analysis.utils import math_util
label_desc: Use image node_id 2 for calling the MathUtilTest obj's underlying member method code with example usage: obj.testCalculateConfidenceIntervalConfusionMatrices() without return types