code: def testBetaSample(self):
      a = 1.0
      b = 2.0
      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,))
      self.assertFalse(np.any(sample_values < 0.0))
      self.assertLess(
          sp_stats.kstest(
              # Beta is a univariate distribution.
              sample_values,
              sp_stats.beta(a=1.0, b=2.0).cdf,
          )[0],
          0.01,
      )
      # The standard error of the sample mean is 1 / (sqrt(18 * n))
      self.assertAllClose(
          sample_values.mean(axis=0),
          sp_stats.beta.mean(a, b),
          atol=1e-2,
      )
      self.assertAllClose(
          np.cov(sample_values, rowvar=0),
          sp_stats.beta.var(a, b),
          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 21 for calling the BetaTest obj's underlying member method code with example usage: obj.testBetaSample() without return types