code: def test_mcnemar_vectorized(reset_randomstate):
      ttk = np.random.randint(5, 15, size=(2, 2, 3))
      with pytest.warns(FutureWarning):
          res = sbmcnemar(ttk, exact=False)
      with pytest.warns(FutureWarning):
          res1 = lzip(
              *[sbmcnemar(ttk[:, :, i], exact=False) for i in range(3)]
          )
      assert_allclose(res, res1, rtol=1e-13)
  
      with pytest.warns(FutureWarning):
          res = sbmcnemar(ttk, exact=False, correction=False)
      with pytest.warns(FutureWarning):
          res1 = lzip(
              *[
                  sbmcnemar(ttk[:, :, i], exact=False, correction=False)
                  for i in range(3)
              ]
          )
      assert_allclose(res, res1, rtol=1e-13)
  
      with pytest.warns(FutureWarning):
          res = sbmcnemar(ttk, exact=True)
      with pytest.warns(FutureWarning):
          res1 = lzip(
              *[sbmcnemar(ttk[:, :, i], exact=True) for i in range(3)]
          )
      assert_allclose(res, res1, rtol=1e-13)
  
imports: from statsmodels.compat.python import lzip
  import numpy
  from numpy.testing import assert_allclose, assert_almost_equal, assert_approx_equal, assert_
  from scipy import stats
  import pytest
  from statsmodels.stats.contingency_tables import mcnemar, cochrans_q, SquareTable
  from statsmodels.sandbox.stats.runs import Runs, runstest_1samp, runstest_2samp
  from statsmodels.sandbox.stats.runs import mcnemar
  from statsmodels.stats.nonparametric import rank_compare_2indep, rank_compare_2ordinal, prob_larger_continuous, cohensd2problarger
  from statsmodels.tools.testing import Holder
label_desc: Use image node_id 4 for calling a global function with example usage: test_mcnemar_vectorized(reset_randomstate) without return types