code: def testVolumeEstimation2D(self):
      # Test that the confidence intervals produced by
      # corr.compte_true_volumes are sound, in the sense of containing
      # the exact volume.
      num_samples = int(1e5)  # Chosen by symmetry with testRejection2D
      det_bounds = np.array(
          [0.01, 0.02, 0.03, 0.04, 0.05, 0.3, 0.35, 0.4, 0.5],
          dtype=np.float32,
      )
      volume_bounds = corr.compute_true_volumes(
          det_bounds, 2, num_samples, error_rate=1e-6, seed=47
      )
      exact_volumes = two_by_two_volume(det_bounds)
      for det, volume in zip(det_bounds, exact_volumes):
          computed_low, computed_high = volume_bounds[det]
          self.assertLess(computed_low, volume)
          self.assertGreater(computed_high, volume)
  
file_path: probability/tensorflow_probability/python/distributions/internal/correlation_matrix_volumes_test.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions.internal import correlation_matrix_volumes_lib
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 4 for calling the CorrelationMatrixVolumesTest obj's underlying member method code with example usage: obj.testVolumeEstimation2D() without return types