code: def test_chisquare_effectsize():
      pr1 = np.array([1020, 690, 510, 420, 360])
      pr2 = np.array([1050, 660, 510, 420, 360])
      # > library(pwr)
      # > ES.w1(pr1/3000, pr2/3000)
      es_r = 0.02699815282115563
      es1 = chisquare_effectsize(pr1, pr2)
      es2 = chisquare_effectsize(pr1, pr2, cohen=False)
      assert_almost_equal(es1, es_r, decimal=14)
      assert_almost_equal(es2, es_r**2, decimal=14)
  
      # regression tests for correction
      res1 = chisquare_effectsize(
          pr1, pr2, cohen=False, correction=(3000, len(pr1) - 1)
      )
      res0 = 0  # -0.00059994422693327625
      assert_equal(res1, res0)
      pr3 = pr2 + [0, 0, 0, 50, 50]
      res1 = chisquare_effectsize(
          pr1, pr3, cohen=False, correction=(3000, len(pr1) - 1)
      )
      res0 = 0.0023106468846296755
      assert_almost_equal(res1, res0, decimal=14)
  
imports: import numpy
  from numpy.testing import assert_almost_equal, assert_equal
  from statsmodels.stats.gof import chisquare, chisquare_power, chisquare_effectsize
  from statsmodels.tools.testing import Holder
label_desc: Use image node_id 3 for calling a global function with example usage: test_chisquare_effectsize() without return types