code: def testEmpiricalCdfAgainstDirichletMultinomial(self):
      # This test is too slow for Eager mode.
      if tf.executing_eagerly():
          return
  
      seed_stream = test_util.test_seed_stream()
  
      n = 10
      c1 = self.evaluate(
          1.0
          + 2.0
          * tf.random.uniform(
              shape=[3], dtype=tf.float32, seed=seed_stream()
          )
      )
      c0 = self.evaluate(
          1.0
          + 2.0
          * tf.random.uniform(
              shape=[3], dtype=tf.float32, seed=seed_stream()
          )
      )
  
      dist = beta_binomial.BetaBinomial(n, c1, c0, validate_args=True)
      dm = dirichlet_multinomial.DirichletMultinomial(
          n, tf.stack([c1, c0], axis=-1), validate_args=True
      )
  
      num_samples_to_draw = tf.math.floor(
          1 + st.min_num_samples_for_dkwm_cdf_two_sample_test(0.02)[0]
      )
  
      beta_binomial_samples = dist.sample(num_samples_to_draw)
  
      dirichlet_multinomial_samples = dm.sample(num_samples_to_draw)
      dirichlet_multinomial_samples = tf.squeeze(
          dirichlet_multinomial_samples[..., 0]
      )
  
      self.evaluate(
          st.assert_true_cdf_equal_by_dkwm_two_sample(
              beta_binomial_samples, dirichlet_multinomial_samples
          )
      )
  
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 9 for calling the BetaBinomialTest obj's underlying member method code with example usage: obj.testEmpiricalCdfAgainstDirichletMultinomial() without return types