code: def testAssertionsProbsMutation(self):
      x = tf.Variable([0.1, 0.7, 0.0])
      d = negative_binomial.NegativeBinomial(
          total_count=8.0, probs=x, validate_args=True
      )
      self.evaluate(x.initializer)
      self.evaluate(d.sample(seed=test_util.test_seed()))
      with tf.control_dependencies([x.assign([0.1, -0.7, 0.0])]):
          with self.assertRaisesOpError(
              "`probs` has components less than 0."
          ):
              self.evaluate(d.sample(seed=test_util.test_seed()))
  
      with tf.control_dependencies([x.assign([0.1, 1.02, 0.0])]):
          with self.assertRaisesOpError(
              "`probs` has components greater than 1."
          ):
              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 1 for calling the NegativeBinomialFromVariableTest obj's underlying member method code with example usage: obj.testAssertionsProbsMutation() without return types