class_docstr: Test Truncated Poisson distribution
class_docstr_tok: ["Test","Truncated","Poisson","distribution"]
code: def test_pmf(self):
      poisson_pmf = poisson.pmf(4, 6) / (1 - poisson.cdf(2, 6))
      tpoisson_pmf = truncatedpoisson.pmf(4, 6, 2)
      assert_allclose(poisson_pmf, tpoisson_pmf, rtol=1e-7)
  
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 TestTruncatedPoisson obj's underlying member method code with example usage: obj.test_pmf() without return types