code: def test_binom_rejection_interval():
      # consistency check with binom_test
      # some code duplication but limit checks are different
      alpha = 0.05
      nobs = 200
      prop = 12.0 / 20
      alternative = "smaller"
      ci_low, ci_upp = smprop.binom_test_reject_interval(
          prop, nobs, alpha=alpha, alternative=alternative
      )
      assert_equal(ci_upp, nobs)
      pval = smprop.binom_test(
          ci_low, nobs, prop=prop, alternative=alternative
      )
      assert_array_less(pval, alpha)
      pval = smprop.binom_test(
          ci_low + 1, nobs, prop=prop, alternative=alternative
      )
      assert_array_less(alpha, pval)
  
      alternative = "larger"
      ci_low, ci_upp = smprop.binom_test_reject_interval(
          prop, nobs, alpha=alpha, alternative=alternative
      )
      assert_equal(ci_low, 0)
      pval = smprop.binom_test(
          ci_upp, nobs, prop=prop, alternative=alternative
      )
      assert_array_less(pval, alpha)
      pval = smprop.binom_test(
          ci_upp - 1, nobs, prop=prop, alternative=alternative
      )
      assert_array_less(alpha, pval)
  
      alternative = "two-sided"
      ci_low, ci_upp = smprop.binom_test_reject_interval(
          prop, nobs, alpha=alpha, alternative=alternative
      )
      pval = smprop.binom_test(
          ci_upp, nobs, prop=prop, alternative=alternative
      )
      assert_array_less(pval, alpha)
      pval = smprop.binom_test(
          ci_upp - 1, nobs, prop=prop, alternative=alternative
      )
      assert_array_less(alpha, pval)
      pval = smprop.binom_test(
          ci_upp, nobs, prop=prop, alternative=alternative
      )
      assert_array_less(pval, alpha)
  
      pval = smprop.binom_test(
          ci_upp - 1, nobs, prop=prop, alternative=alternative
      )
      assert_array_less(alpha, pval)
  
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 9 for calling a global function with example usage: test_binom_rejection_interval() without return types