code: def testPmfAndCdfNonIntegerCounts(self):
      p = [[0.1, 0.2, 0.7]]
      n = [[5.0]]
      # No errors with integer n.
      binom = binomial_lib.Binomial(
          total_count=n, probs=p, validate_args=True
      )
      self.evaluate(binom.prob([2.0, 3, 2]))
      self.evaluate(binom.prob([3.0, 1, 2]))
      self.evaluate(binom.cdf([2.0, 3, 2]))
      self.evaluate(binom.cdf([3.0, 1, 2]))
      placeholder = tf1.placeholder_with_default(
          [1.0, 2.5, 1.5], shape=[3]
      )
      # Both equality and integer checking fail.
      with self.assertRaisesOpError(
          "cannot contain fractional components."
      ):
          self.evaluate(binom.prob(placeholder))
      with self.assertRaisesOpError(
          "cannot contain fractional components."
      ):
          self.evaluate(binom.cdf(placeholder))
  
      binom = binomial_lib.Binomial(
          total_count=n, probs=p, validate_args=False
      )
      self.evaluate(binom.prob([1.0, 2.0, 3.0]))
      self.evaluate(binom.cdf([1.0, 2.0, 3.0]))
      # Non-integer arguments work.
      self.evaluate(binom.prob([1.0, 2.5, 1.5]))
      self.evaluate(binom.cdf([1.0, 2.5, 1.5]))
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import binomial
  from tensorflow_probability.python.internal import implementation_selection
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 10 for calling the BinomialTest obj's underlying member method code with example usage: obj.testPmfAndCdfNonIntegerCounts() without return types