class_docstr: Test Truncated Poisson distribution
class_docstr_tok: ["Test","Truncated","Poisson","distribution"]
code: def test_pmf(self):
      n, p = truncatednegbin.convert_params(2, 0.5, 2)
      nb_logpmf = nbinom.pmf(6, n, p) / nbinom.sf(5, n, p)
      tnb_pmf = truncatednegbin.pmf(6, 2, 0.5, 2, 5)
      assert_allclose(nb_logpmf, tnb_pmf, rtol=1e-7)
  
      tnb_pmf = truncatednegbin.pmf(5, 2, 0.5, 2, 5)
      assert_equal(tnb_pmf, 0)
  
imports: import numpy
  from numpy.testing import assert_allclose, assert_equal
  from scipy import stats
  from scipy.stats import poisson, nbinom
  from statsmodels.tools.tools import Bunch
  from statsmodels.distributions.discrete import genpoisson_p, truncatedpoisson, truncatednegbin, zipoisson, zinegbin, zigenpoisson, DiscretizedCount, DiscretizedModel
label_desc: Use image node_id 3 for calling the TestTruncatedNBP obj's underlying member method code with example usage: obj.test_pmf() without return types