code: def test_noncent_f():
      # F(4, 75) = 3.5, confidence level = .95, two-sided CI:
      # > lof(3.5,4,75,.95)
      # [1] 0.7781436 0.9750039
      # > hif(3.5,4,75,.95)
      # [1] 29.72949219 0.02499965
      f_stat, df1, df2 = 3.5, 4, 75
  
      ci_nc = [0.7781436, 29.72949219]
      res = _noncentrality_f(f_stat, df1, df2, alpha=0.05)
      assert_allclose(res.confint, ci_nc, rtol=0.005)
      # verify umvue unbiased
      mean = stats.ncf.mean(df1, df2, res.nc)
      assert_allclose(f_stat, mean, rtol=1e-8)
  
      # Relax tolerance due to changes in SciPy and Boost
      assert_allclose(
          stats.ncf.cdf(f_stat, df1, df2, res.confint),
          [0.975, 0.025],
          rtol=5e-5,
      )
  
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 2 for calling a global function with example usage: test_noncent_f() without return types