code: def test_binom_tost():
      # consistency check with two different implementation,
      # proportion_confint is tested against R
      # no reference case from other package available
      ci = smprop.proportion_confint(10, 20, method="beta", alpha=0.1)
      bt = smprop.binom_tost(10, 20, *ci)
      assert_almost_equal(bt, [0.05] * 3, decimal=12)
  
      ci = smprop.proportion_confint(5, 20, method="beta", alpha=0.1)
      bt = smprop.binom_tost(5, 20, *ci)
      assert_almost_equal(bt, [0.05] * 3, decimal=12)
  
      # vectorized, TODO: observed proportion = 0 returns nan
      ci = smprop.proportion_confint(
          np.arange(1, 20), 20, method="beta", alpha=0.05
      )
      bt = smprop.binom_tost(np.arange(1, 20), 20, ci[0], ci[1])
      bt = np.asarray(bt)
      assert_almost_equal(bt, 0.025 * np.ones(bt.shape), decimal=12)
  
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 10 for calling a global function with example usage: test_binom_tost() without return types