code: def _expand_table(table):
      """expand a 2 by 2 contingency table to observations"""
      return np.repeat(
          [[1, 1], [1, 0], [0, 1], [0, 0]], table.ravel(), axis=0
      )
  
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 1 for calling a global function with example usage: _expand_table(table) and returns: np