code: def testAssertionsTotalCount(self):
      x = tf.Variable([-5.0, 3.0, -1.0])
      d = negative_binomial.NegativeBinomial(
          total_count=x, probs=0.7, validate_args=True
      )
      self.evaluate(x.initializer)
      with self.assertRaisesOpError(
          "`total_count` has components less than or equal to 0."
      ):
          self.evaluate(d.sample(seed=test_util.test_seed()))
  
      x = tf.Variable([5.0, 3.7, 1.0])
      d = negative_binomial.NegativeBinomial(
          total_count=x, probs=0.7, validate_args=True
      )
      self.evaluate(x.initializer)
      with self.assertRaisesOpError(
          "`total_count` has fractional components."
      ):
          self.evaluate(d.sample(seed=test_util.test_seed()))
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import negative_binomial
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 5 for calling the NegativeBinomialFromVariableTest obj's underlying member method code with example usage: obj.testAssertionsTotalCount() without return types