code: def test_mcnemar():
      # Use chi^2 without continuity correction
      b1 = ctab.mcnemar(tables[0], exact=False, correction=False)
  
      st = sm.stats.SquareTable(tables[0])
      b2 = st.homogeneity()
      assert_allclose(b1.statistic, b2.statistic)
      assert_equal(b2.df, 1)
  
      # Use chi^2 with continuity correction
      b3 = ctab.mcnemar(tables[0], exact=False, correction=True)
      assert_allclose(b3.pvalue, r_results.loc[0, "homog_cont_p"])
  
      # Use binomial reference distribution
      b4 = ctab.mcnemar(tables[0], exact=True)
      assert_allclose(b4.pvalue, r_results.loc[0, "homog_binom_p"])
  
imports: import os
  import warnings
  import numpy
  import statsmodels.stats.contingency_tables
  import pandas
  from numpy.testing import assert_allclose, assert_equal
  import statsmodels.api
label_desc: Use image node_id 12 for calling a global function with example usage: test_mcnemar() without return types