code: def test_noncent_chi2():
      # > lochi(7.5,2,.95)
      # [1] 0.03349255 0.97499458
      # > hichi(7.5,2,.95)
      # [1] 20.76049805 0.02500663
  
      chi2_stat, df = 7.5, 2
      ci_nc = [0.03349255, 20.76049805]
      res = _noncentrality_chisquare(chi2_stat, df, alpha=0.05)
      assert_allclose(res.confint, ci_nc, rtol=0.005)
      # verify umvue unbiased
      mean = stats.ncx2.mean(df, res.nc)
      assert_allclose(chi2_stat, mean, rtol=1e-8)
  
      assert_allclose(
          stats.ncx2.cdf(chi2_stat, df, res.confint),
          [0.975, 0.025],
          rtol=1e-8,
      )
  
imports: from scipy import stats
  from numpy.testing import assert_allclose
  from statsmodels.stats.effect_size import _noncentrality_chisquare, _noncentrality_f, _noncentrality_t
label_desc: Use image node_id 1 for calling a global function with example usage: test_noncent_chi2() without return types