code: def binom_test_reject_interval(
      value, nobs, alpha=0.05, alternative="two-sided"
  ):
      """
      Rejection region for binomial test for one sample proportion
  
      The interval includes the end points of the rejection region.
  
      Parameters
      ----------
      value : float
          proportion under the Null hypothesis
      nobs : int
          the number of trials or observations.
  
      Returns
      -------
      x_low, x_upp : int
          lower and upper bound of rejection region
      """
      if alternative in ["2s", "two-sided"]:
          alternative = "2s"  # normalize alternative name
          alpha = alpha / 2
  
      if alternative in ["2s", "smaller"]:
          x_low = stats.binom.ppf(alpha, nobs, value) - 1
      else:
          x_low = 0
      if alternative in ["2s", "larger"]:
          x_upp = stats.binom.isf(alpha, nobs, value) + 1
      else:
          x_upp = nobs
  
      return int(x_low), int(x_upp)
  
imports: from statsmodels.compat.python import lzip
  from typing import Callable
  import numpy
  import pandas
  from scipy import optimize, stats
  from statsmodels.stats.base import AllPairsResults, HolderTuple
  from statsmodels.stats.weightstats import _zstat_generic2
  from statsmodels.tools.sm_exceptions import HypothesisTestWarning
  from statsmodels.tools.testing import Holder
  from statsmodels.tools.validation import array_like
label_desc: Use image node_id 12 for calling a global function with example usage: binom_test_reject_interval(value, nobs, alpha, alternative) and returns: int,  int