code: def test_df(self):
      res = self.res1
      k_extra = getattr(self, "k_extra", 0)
      if res.model.exog is not None:
          nobs, k_vars = res.model.exog.shape
          k_constant = 1
      else:
          nobs, k_vars = res.model.endog.shape[0], 0
          k_constant = 0
      assert res.df_resid == nobs - k_vars - k_extra
      assert res.df_model == k_vars - k_constant
      assert len(res.params) == k_vars + k_extra
  
imports: import numpy
  from scipy import stats
  from statsmodels.base.model import GenericLikelihoodModel
  from numpy.testing import assert_array_less, assert_almost_equal, assert_allclose
label_desc: Use image node_id 5 for calling the CheckGenericMixin obj's underlying member method code with example usage: obj.test_df() without return types