code: def testInvalidP(self):
      invalid_ps = [
          -0.01,
          0.0,
          -2.0,
      ]
      with self.assertRaisesOpError(
          "`probs` has components less than 0."
      ):
          negbinom = negative_binomial.NegativeBinomial(
              5.0, probs=invalid_ps, validate_args=True
          )
          self.evaluate(negbinom.sample(seed=test_util.test_seed()))
  
      invalid_ps = [
          1.01,
          2.0,
          1.001,
      ]
      with self.assertRaisesOpError(
          "`probs` has components greater than 1."
      ):
          negbinom = negative_binomial.NegativeBinomial(
              5.0, probs=invalid_ps, validate_args=True
          )
          self.evaluate(negbinom.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 4 for calling the NegativeBinomialTest obj's underlying member method code with example usage: obj.testInvalidP() without return types