code: def _invert_test_confint(
      count, nobs, alpha=0.05, method="midp-c", method_start="exact-c"
  ):
      """invert hypothesis test to get confidence interval"""
  
      def func(r):
          v = (
              test_poisson(count, nobs, value=r, method=method)[1]
              - alpha
          ) ** 2
          return v
  
      ci = confint_poisson(count, nobs, method=method_start)
      low = optimize.fmin(func, ci[0], xtol=1e-8, disp=False)
      upp = optimize.fmin(func, ci[1], xtol=1e-8, disp=False)
      assert np.size(low) == 1
      return low[0], upp[0]
  
imports: import numpy
  import warnings
  from scipy import stats, optimize
  from statsmodels.stats.base import HolderTuple
  from statsmodels.stats.weightstats import _zstat_generic2
  from statsmodels.stats._inference_tools import _mover_confint
label_desc: Use image node_id 5 for calling a global function with example usage: _invert_test_confint(count, nobs, alpha, method, method_start) and returns: low,  upp, v