code: def testPmfNonIntegerCounts(self):
      alpha = [[1.0, 2, 3]]
      n = [[5.0]]
      with self.cached_session():
          dist = ds.DirichletMultinomial(n, alpha, validate_args=True)
          dist.prob([2.0, 3, 0]).eval()
          dist.prob([3.0, 0, 2]).eval()
          dist.prob([3.0, 0, 2.0]).eval()
          # Both equality and integer checking fail.
          placeholder = array_ops.placeholder(dtypes.float32)
          with self.assertRaisesOpError(
              "cannot contain fractional components"
          ):
              dist.prob(placeholder).eval(
                  feed_dict={placeholder: [1.0, 2.5, 1.5]}
              )
          dist = ds.DirichletMultinomial(n, alpha, validate_args=False)
          dist.prob([1.0, 2.0, 3.0]).eval()
          # Non-integer arguments work.
          dist.prob([1.0, 2.5, 1.5]).eval()
  
imports: import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.distributions import dirichlet_multinomial
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the DirichletMultinomialTest obj's underlying member method code with example usage: obj.testPmfNonIntegerCounts() without return types