code: def test_diagnostic(self):
      # smoke test for now
      res1 = self.res1
  
      dia = res1.get_diagnostic(y_max=21)
      res_chi2 = dia.test_chisquare_prob(bin_edges=np.arange(4))
      assert_equal(res_chi2.diff1.shape[1], 3)
      assert_equal(dia.probs_predicted.shape[1], 22)
  
      try:
          dia.plot_probs(upp_xlim=20)
      except ImportError:
          pass
  
imports: import warnings
  import numpy
  from numpy.testing import assert_allclose, assert_equal
  import pytest
  from statsmodels.tools.tools import add_constant
  from statsmodels.base._prediction_inference import PredictionResultsMonotonic
  from statsmodels.discrete.discrete_model import BinaryModel, Logit, Probit, Poisson, NegativeBinomial, NegativeBinomialP, GeneralizedPoisson
  from statsmodels.discrete.count_model import ZeroInflatedPoisson, ZeroInflatedNegativeBinomialP, ZeroInflatedGeneralizedPoisson
  from statsmodels.sandbox.regression.tests.test_gmm_poisson import DATA
  from .results import results_predict
label_desc: Use image node_id 3 for calling the CheckPredict obj's underlying member method code with example usage: obj.test_diagnostic() without return types