code: def test_power_ztost_prop():
      power = smprop.power_ztost_prop(
          0.1,
          0.9,
          10,
          p_alt=0.6,
          alpha=0.05,
          discrete=True,
          dist="binom",
      )[0]
      assert_almost_equal(power, 0.8204, decimal=4)  # PASS example
  
      with warnings.catch_warnings():  # python >= 2.6
          warnings.simplefilter("ignore", HypothesisTestWarning)
          power = smprop.power_ztost_prop(
              0.4,
              0.6,
              np.arange(20, 210, 20),
              p_alt=0.5,
              alpha=0.05,
              discrete=False,
              dist="binom",
          )[0]
  
          res_power = np.array(
              [
                  0.0,
                  0.0,
                  0.0,
                  0.0889,
                  0.2356,
                  0.4770,
                  0.5530,
                  0.6154,
                  0.7365,
                  0.7708,
              ]
          )
          # TODO: I currently do not impose power>=0, i.e np.maximum(power, 0)
          assert_almost_equal(
              np.maximum(power, 0), res_power, decimal=4
          )
  
          # with critval_continuity correction
          power = smprop.power_ztost_prop(
              0.4,
              0.6,
              np.arange(20, 210, 20),
              p_alt=0.5,
              alpha=0.05,
              discrete=False,
              dist="binom",
              variance_prop=None,
              continuity=2,
              critval_continuity=1,
          )[0]
  
          res_power = np.array(
              [
                  0.0,
                  0.0,
                  0.0,
                  0.0889,
                  0.2356,
                  0.3517,
                  0.4457,
                  0.6154,
                  0.6674,
                  0.7708,
              ]
          )
          # TODO: I currently do not impose power>=0, i.e np.maximum(power, 0)
          assert_almost_equal(
              np.maximum(power, 0), res_power, decimal=4
          )
  
          power = smprop.power_ztost_prop(
              0.4,
              0.6,
              np.arange(20, 210, 20),
              p_alt=0.5,
              alpha=0.05,
              discrete=False,
              dist="binom",
              variance_prop=0.5,
              critval_continuity=1,
          )[0]
  
          res_power = np.array(
              [
                  0.0,
                  0.0,
                  0.0,
                  0.0889,
                  0.2356,
                  0.3517,
                  0.4457,
                  0.6154,
                  0.6674,
                  0.7112,
              ]
          )
          # TODO: I currently do not impose power>=0, i.e np.maximum(power, 0)
          assert_almost_equal(
              np.maximum(power, 0), res_power, decimal=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 12 for calling a global function with example usage: test_power_ztost_prop() without return types