code: def testNegativeBinomialLogPmf(self):
      batch_size = 6
      probs = [0.2] * batch_size
      probs_v = 0.2
      total_count = 5.0
      x = np.array([2.0, 3.0, 4.0, 5.0, 6.0, 7.0], dtype=np.float32)
      negbinom = negative_binomial.NegativeBinomial(
          total_count=total_count, probs=probs, validate_args=True
      )
      expected_log_pmf = stats.nbinom.logpmf(
          x, n=total_count, p=1 - probs_v
      )
      log_pmf = negbinom.log_prob(x)
      self.assertEqual([6], log_pmf.shape)
      self.assertAllClose(expected_log_pmf, self.evaluate(log_pmf))
  
      pmf = negbinom.prob(x)
      self.assertEqual([6], pmf.shape)
      self.assertAllClose(np.exp(expected_log_pmf), self.evaluate(pmf))
  
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 9 for calling the NegativeBinomialTest obj's underlying member method code with example usage: obj.testNegativeBinomialLogPmf() without return types