code: def testSampleAgainstProb(self):
      seed_stream = test_util.test_seed_stream()
  
      n = 4
      c1 = self.evaluate(
          1.0
          + 2.0
          * tf.random.uniform(
              shape=[4, 3, 2], dtype=tf.float32, seed=seed_stream()
          )
      )
      c0 = self.evaluate(
          1.0
          + 2.0
          * tf.random.uniform(
              shape=[4, 3, 1], dtype=tf.float32, seed=seed_stream()
          )
      )
      dist = beta_binomial.BetaBinomial(
          tf.cast(n, dtype=tf.float32), c1, c0, validate_args=True
      )
  
      num_samples = int(1e4)
      x = self.evaluate(
          tf.cast(
              dist.sample(num_samples, seed=seed_stream()), tf.int32
          )
      )
  
      for i in range(n + 1):
          self.assertAllClose(
              self.evaluate(dist.prob(i)),
              np.sum(x == i, axis=0) / (num_samples * 1.0),
              atol=0.01,
              rtol=0.1,
          )
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import beta_binomial
  from tensorflow_probability.python.distributions import dirichlet_multinomial
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 6 for calling the BetaBinomialTest obj's underlying member method code with example usage: obj.testSampleAgainstProb() without return types