code: def testLargeTauGivesPreciseProbabilities(self):
      # If tau is large, we are doing coin flips with probability mu.
      mu = np.array([0.1, 0.1, 0.8], dtype=np.float32)
      tau = np.array([100.0], dtype=np.float32)
      alpha = tau * mu
  
      # One (three sided) coin flip.  Prob[coin 3] = 0.8.
      # Note that since it was one flip, value of tau didn't matter.
      counts = [0.0, 0, 1]
      dist = dm.DirichletMultinomial(1.0, alpha, validate_args=True)
      pmf = dist.prob(counts)
      self.assertAllClose(0.8, self.evaluate(pmf), atol=1e-4)
      self.assertEqual((), pmf.shape)
  
      # Two (three sided) coin flips.  Prob[coin 3] = 0.8.
      counts = [0.0, 0, 2]
      dist = dm.DirichletMultinomial(2.0, alpha, validate_args=True)
      pmf = dist.prob(counts)
      self.assertAllClose(0.8**2, self.evaluate(pmf), atol=1e-2)
      self.assertEqual((), pmf.shape)
  
      # Three (three sided) coin flips.
      counts = [1.0, 0, 2]
      dist = dm.DirichletMultinomial(3.0, alpha, validate_args=True)
      pmf = dist.prob(counts)
      self.assertAllClose(
          3 * 0.1 * 0.8 * 0.8, self.evaluate(pmf), atol=1e-2
      )
      self.assertEqual((), pmf.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 22 for calling the DirichletMultinomialTest obj's underlying member method code with example usage: obj.testLargeTauGivesPreciseProbabilities() without return types