code: def testAssertionsTotalCount(self):
      total_count = tf.Variable([-1.0, 4.0, 1.0])
      d = beta_binomial.BetaBinomial(
          total_count, 1.0, 1.0, validate_args=True
      )
      self.evaluate([v.initializer for v in d.variables])
      with self.assertRaisesOpError(
          "`total_count` must be non-negative."
      ):
          self.evaluate(d.mean())
  
      total_count = tf.Variable([0.5, 4.0, 1.0])
      d = beta_binomial.BetaBinomial(
          total_count, 1.0, 1.0, validate_args=True
      )
      self.evaluate([v.initializer for v in d.variables])
      with self.assertRaisesOpError(
          "`total_count` cannot contain fractional components."
      ):
          self.evaluate(d.mean())
  
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 1 for calling the BetaBinomialFromVariableTest obj's underlying member method code with example usage: obj.testAssertionsTotalCount() without return types