code: def setup_class(cls):
      expected_params = [1, 1, 0.5]
      np.random.seed(987123)
      nobs = 500
      exog = np.ones((nobs, 2))
      exog[: nobs // 2, 1] = 0
      # offset is used to create misspecification of the model
      # for predicted probabilities conditional moment test
      # offset = 0.5 * np.random.randn(nobs)
      # range_mix = 0.5
      # offset = -range_mix / 2 + range_mix * np.random.rand(nobs)
      offset = 0
      mu_true = np.exp(exog.dot(expected_params[:-1]) + offset)
  
      endog_poi = np.random.poisson(mu_true / 5)
      # endog3 = distr.zigenpoisson.rvs(mu_true, 0,
      #                                2, 0.01, size=mu_true.shape)
  
      model_poi = Poisson(endog_poi, exog)
      res_poi = model_poi.fit(method="bfgs", maxiter=5000, disp=False)
      cls.exog = exog
      cls.endog = endog_poi
      cls.res = res_poi
      cls.nobs = nobs
  
file_path: statsmodels/statsmodels/discrete/tests/test_diagnostic.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_equal
  import pytest
  from statsmodels.discrete.discrete_model import Poisson
  import statsmodels.discrete._diagnostics_count
  from statsmodels.discrete.diagnostic import PoissonDiagnostic
label_desc: Use image node_id 1 for calling the TestCountDiagnostic obj's underlying member method code with example usage: obj.setup_class(cls) without return types