code: def test_confint_proportion_ndim(method):
      # check that it works with 1-D, 2-D and pandas
  
      count = np.arange(6).reshape(2, 3)
      nobs = 10 * np.ones((2, 3))
  
      count_pd = pd.DataFrame(count)
      nobs_pd = pd.DataFrame(nobs)
  
      ci_arr = proportion_confint(
          count, nobs, alpha=0.05, method=method
      )
      ci_pd = proportion_confint(
          count_pd, nobs_pd, alpha=0.05, method=method
      )
      assert_allclose(
          ci_arr, (ci_pd[0].values, ci_pd[1].values), rtol=1e-13
      )
      # spot checking one value
      ci12 = proportion_confint(
          count[1, 2], nobs[1, 2], alpha=0.05, method=method
      )
      assert_allclose(
          (ci_pd[0].values[1, 2], ci_pd[1].values[1, 2]),
          ci12,
          rtol=1e-13,
      )
      assert_allclose(
          (ci_arr[0][1, 2], ci_arr[1][1, 2]), ci12, rtol=1e-13
      )
  
      # check that lists work as input
      ci_li = proportion_confint(
          count.tolist(), nobs.tolist(), alpha=0.05, method=method
      )
      assert_allclose(ci_arr, (ci_li[0], ci_li[1]), rtol=1e-13)
  
      # check pandas Series, 1-D
      ci_pds = proportion_confint(
          count_pd.iloc[0], nobs_pd.iloc[0], alpha=0.05, method=method
      )
      assert_allclose(
          (ci_pds[0].values, ci_pds[1].values),
          (ci_pd[0].values[0], ci_pd[1].values[0]),
          rtol=1e-13,
      )
  
      # check scalar nobs, verifying one value
      ci_arr2 = proportion_confint(
          count, nobs[1, 2], alpha=0.05, method=method
      )
      assert_allclose(
          (ci_arr2[0][1, 2], ci_arr[1][1, 2]), ci12, rtol=1e-13
      )
  
      # check floating point values
      ci_arr2 = proportion_confint(
          count + 1e-4, nobs[1, 2], alpha=0.05, method=method
      )
      # should be close to values with integer values
      assert_allclose(
          (ci_arr2[0][1, 2], ci_arr[1][1, 2]), ci12, rtol=1e-4
      )
  
imports: import warnings
  import numpy
  from numpy.testing import assert_allclose, assert_almost_equal, assert_array_less, assert_equal, assert_raises
  import pandas
  import pytest
  import statsmodels.stats.proportion
  from statsmodels.stats.proportion import confint_proportions_2indep, multinomial_proportions_confint, power_proportions_2indep, proportion_confint, samplesize_proportions_2indep_onetail, score_test_proportions_2indep
  from statsmodels.tools.sm_exceptions import HypothesisTestWarning
  from statsmodels.tools.testing import Holder
  from statsmodels.stats.tests.results.results_proportion import res_binom, res_binom_methods
label_desc: Use image node_id 2 for calling a global function with example usage: test_confint_proportion_ndim(method) without return types