code: def testBetaSampleMultidimensional(self):
      a = np.random.rand(3, 2, 2).astype(np.float32)
      b = np.random.rand(3, 2, 2).astype(np.float32)
      dist = beta.Beta(a, b, validate_args=True)
      n = tf.constant(100000)
      samples = dist.sample(n, seed=test_util.test_seed())
      sample_values = self.evaluate(samples)
      self.assertEqual(sample_values.shape, (100000, 3, 2, 2))
      self.assertFalse(np.any(sample_values < 0.0))
      # Pass f64 values to avoid errors in scipy.
      self.assertAllClose(
          sample_values[:, 1, :].mean(axis=0),
          sp_stats.beta.mean(
              a.astype(np.float64), b.astype(np.float64)
          )[1, :],
          atol=1e-1,
      )
  
imports: from absl.testing import parameterized
  import numpy
  from scipy import special
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import beta
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 24 for calling the BetaTest obj's underlying member method code with example usage: obj.testBetaSampleMultidimensional() without return types