code: def test_wald_score(self):
      mod_full = self.model_full
      mod_drop = self.model_drop
      restriction = "x5=0, x6=0"
      res_full = mod_full.fit()
      res_constr = mod_full.fit_constrained("x5=0, x6=0")
      res_drop = mod_drop.fit()
  
      wald = res_full.wald_test(restriction, scalar=True)
      # note: need to use method for res_constr for correct df_resid
      lm_constr = np.hstack(res_constr.score_test())
      lm_extra = np.hstack(
          score_test(res_drop, exog_extra=self.exog_extra)
      )
      lm_full = np.hstack(
          res_full.score_test(
              params_constrained=res_constr.params,
              k_constraints=res_constr.k_constr,
          )
      )
  
      res_wald = np.hstack(
          [wald.statistic, wald.pvalue, [wald.df_denom]]
      )
      assert_allclose(
          lm_constr, res_wald, rtol=self.rtol_ws, atol=self.atol_ws
      )
      assert_allclose(
          lm_extra, res_wald, rtol=self.rtol_ws, atol=self.atol_ws
      )
      assert_allclose(lm_constr, lm_extra, rtol=1e-12, atol=1e-14)
      assert_allclose(lm_full, lm_extra, rtol=1e-12, atol=1e-14)
      # regression number
      assert_allclose(
          lm_constr[1], self.res_pvalue[0], rtol=1e-12, atol=1e-14
      )
  
      cov_type = "HC0"
      res_full_hc = mod_full.fit(
          cov_type=cov_type, start_params=res_full.params
      )
      wald = res_full_hc.wald_test(restriction, scalar=True)
      lm_constr = np.hstack(score_test(res_constr, cov_type=cov_type))
      lm_extra = np.hstack(
          score_test(
              res_drop, exog_extra=self.exog_extra, cov_type=cov_type
          )
      )
  
      res_wald = np.hstack(
          [wald.statistic, wald.pvalue, [wald.df_denom]]
      )
      assert_allclose(
          lm_constr, res_wald, rtol=self.rtol_ws, atol=self.atol_ws
      )
      assert_allclose(
          lm_extra, res_wald, rtol=self.rtol_ws, atol=self.atol_ws
      )
      assert_allclose(lm_constr, lm_extra, rtol=1e-13)
      # regression number
      assert_allclose(
          lm_constr[1], self.res_pvalue[1], rtol=1e-12, atol=1e-14
      )
  
      if not self.skip_wooldridge:
          # compare with Wooldridge auxiliary regression
          # does not work for Poisson, even with family attribute
          # diao.lm_test_glm assumes fittedvalues is mean (not linear pred)
          lm_wooldridge = diao.lm_test_glm(res_drop, self.exog_extra)
          assert_allclose(
              lm_wooldridge.pval1,
              self.res_pvalue[0],
              rtol=1e-12,
              atol=1e-14,
          )
          assert_allclose(
              lm_wooldridge.pval3,
              self.res_pvalue[1],
              rtol=self.rtol_wooldridge,
          )
          # smoke test
          lm_wooldridge.summary()
  
imports: import numpy
  from numpy.testing import assert_allclose
  from statsmodels.genmod.generalized_linear_model import GLM
  from statsmodels.genmod import families
  from statsmodels.discrete.discrete_model import Poisson
  import statsmodels.stats._diagnostic_other
  import statsmodels.discrete._diagnostics_count
  from statsmodels.base._parameter_inference import score_test
label_desc: Use image node_id 1 for calling the CheckScoreTest obj's underlying member method code with example usage: obj.test_wald_score() without return types