code: def test_predict_distribution(self):
      res = self.res
      model = self.mod
  
      with pytest.raises(ValueError):
          # No "result" attribute
          model.predict_distribution(model.exog)
  
      try:
          model.result = res
          dist = model.predict_distribution(model.exog)
          assert isinstance(dist, stats._distn_infrastructure.rv_frozen)
          assert_almost_equal(
              dist.mean(), np.exp(model.exog.dot(res.params)), 15
          )
      finally:
          # leave the model object how we found it
          model.__delattr__("result")
  
imports: import pytest
  import numpy
  from numpy.testing import assert_almost_equal
  from scipy import stats
  import statsmodels.api
  from statsmodels.miscmodels.count import PoissonGMLE, PoissonOffsetGMLE, PoissonZiGMLE
  from statsmodels.discrete.discrete_model import Poisson
  from statsmodels.tools.sm_exceptions import ValueWarning
label_desc: Use image node_id 2 for calling the TestPoissonMLE obj's underlying member method code with example usage: obj.test_predict_distribution() without return types