code: def test_dl(self):
      res = results_meta.exk1_dl
      eff, var_eff = self.eff, self.var_eff
  
      tau2 = _fit_tau_mm(eff, var_eff, 1 / var_eff)
      assert_allclose(tau2, res.tau2, atol=1e-10)
  
      res3 = combine_effects(eff, var_eff, method_re="dl")
      assert_allclose(res3.tau2, res.tau2, atol=1e-10)
      assert_allclose(res3.mean_effect_re, res.b, atol=1e-13)
      assert_allclose(res3.sd_eff_w_re, res.se, atol=1e-10)
      ci = res3.conf_int(use_t=False)  # fe, re, fe_wls, re_wls
      assert_allclose(ci[1][0], res.ci_lb, atol=1e-10)
      assert_allclose(ci[1][1], res.ci_ub, atol=1e-10)
  
      assert_allclose(res3.q, res.QE, atol=1e-10)
      # I2 is in percent in metafor
      assert_allclose(res3.i2, res.I2 / 100, atol=1e-10)
      assert_allclose(res3.h2, res.H2, atol=1e-10)
      th = res3.test_homogeneity()
      q, pv = th
      df = th.df
      assert_allclose(pv, res.QEp, atol=1e-10)
      assert_allclose(q, res.QE, atol=1e-10)
      assert_allclose(df, 9 - 1, atol=1e-10)
  
      # compare FE estimate
      res_fe = results_meta.exk1_fe
      assert_allclose(res3.mean_effect_fe, res_fe.b, atol=1e-13)
      assert_allclose(res3.sd_eff_w_fe, res_fe.se, atol=1e-10)
  
      assert_allclose(ci[0][0], res_fe.ci_lb, atol=1e-10)
      assert_allclose(ci[0][1], res_fe.ci_ub, atol=1e-10)
  
      # compare FE, RE with HKSJ adjustment
      res_dls = results_meta.exk1_dl_hksj
      res_fes = results_meta.exk1_fe_hksj
  
      assert_allclose(res3.mean_effect_re, res_dls.b, atol=1e-13)
      assert_allclose(res3.mean_effect_fe, res_fes.b, atol=1e-13)
  
      assert_allclose(
          res3.sd_eff_w_fe * np.sqrt(res3.scale_hksj_fe),
          res_fes.se,
          atol=1e-10,
      )
      assert_allclose(
          res3.sd_eff_w_re * np.sqrt(res3.scale_hksj_re),
          res_dls.se,
          atol=1e-10,
      )
      assert_allclose(np.sqrt(res3.var_hksj_fe), res_fes.se, atol=1e-10)
      assert_allclose(np.sqrt(res3.var_hksj_re), res_dls.se, atol=1e-10)
  
      # metafor uses t distribution for hksj
      ci = res3.conf_int(use_t=True)  # fe, re, fe_wls, re_wls
      assert_allclose(ci[3][0], res_dls.ci_lb, atol=1e-10)
      assert_allclose(ci[3][1], res_dls.ci_ub, atol=1e-10)
      assert_allclose(ci[2][0], res_fes.ci_lb, atol=1e-10)
      assert_allclose(ci[2][1], res_fes.ci_ub, atol=1e-10)
  
      th = res3.test_homogeneity()
      q, pv = th
      df = th.df
      assert_allclose(pv, res_dls.QEp, atol=1e-10)
      assert_allclose(q, res_dls.QE, atol=1e-10)
      assert_allclose(df, 9 - 1, atol=1e-10)
  
imports: import io
  import numpy
  import pandas
  import pytest
  from numpy.testing import assert_equal, assert_allclose
  from statsmodels.regression.linear_model import WLS
  from statsmodels.genmod.generalized_linear_model import GLM
  from statsmodels.stats.meta_analysis import effectsize_smd, effectsize_2proportions, combine_effects, _fit_tau_iterative, _fit_tau_mm, _fit_tau_iter_mm
  from .results import results_meta
label_desc: Use image node_id 4 for calling the TestMetaK1 obj's underlying member method code with example usage: obj.test_dl() without return types