code: def testSmallTauPrefersCorrelatedResults(self):
      # If tau is small, then correlation between draws is large, so draws that
      # are both of the same class are more likely.
      mu = np.array([0.5, 0.5], dtype=np.float32)
      tau = np.array([0.1], dtype=np.float32)
      alpha = tau * mu
  
      # If there is only one draw, it is still a coin flip, even with small tau.
      counts = [1.0, 0]
      dist = dm.DirichletMultinomial(1.0, alpha, validate_args=True)
      pmf = dist.prob(counts)
      self.assertAllClose(0.5, self.evaluate(pmf))
      self.assertEqual((), pmf.shape)
  
      # If there are two draws, it is much more likely that they are the same.
      counts_same = [2.0, 0]
      counts_different = [1, 1.0]
      dist = dm.DirichletMultinomial(2.0, alpha, validate_args=True)
      pmf_same = dist.prob(counts_same)
      pmf_different = dist.prob(counts_different)
      self.assertLess(
          5 * self.evaluate(pmf_different), self.evaluate(pmf_same)
      )
      self.assertEqual((), pmf_same.shape)
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import dirichlet_multinomial
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 23 for calling the DirichletMultinomialTest obj's underlying member method code with example usage: obj.testSmallTauPrefersCorrelatedResults() without return types