code: def test_df(self):
      res = self.res
      k_extra = getattr(self, "k_extra", 0)
      nobs, k_vars = res.model.exog.shape
      assert res.df_resid == nobs - k_vars - k_extra
      assert res.df_model == k_vars - 1  # -1 for constant
      assert len(res.params) == k_vars + k_extra
  
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 4 for calling the CompareMixin obj's underlying member method code with example usage: obj.test_df() without return types