code: def test_conf_int_basic(bs_setup):
      num_bootstrap = 200
      bs = IIDBootstrap(bs_setup.x)
  
      ci = bs.conf_int(
          bs_setup.func, reps=num_bootstrap, size=0.90, method="basic"
      )
      bs.reset()
      ci_u = bs.conf_int(
          bs_setup.func,
          tail="upper",
          reps=num_bootstrap,
          size=0.95,
          method="basic",
      )
      bs.reset()
      ci_l = bs.conf_int(
          bs_setup.func,
          tail="lower",
          reps=num_bootstrap,
          size=0.95,
          method="basic",
      )
      bs.reset()
      results = np.zeros((num_bootstrap, 2))
      count = 0
      for pos, _ in bs.bootstrap(num_bootstrap):
          results[count] = bs_setup.func(*pos)
          count += 1
      mu = bs_setup.func(bs_setup.x)
      upper = mu + (mu - np.percentile(results, 5, axis=0))
      lower = mu + (mu - np.percentile(results, 95, axis=0))
  
      assert_allclose(lower, ci[0, :])
      assert_allclose(upper, ci[1, :])
  
      assert_allclose(ci[1, :], ci_u[1, :])
      assert_allclose(ci[0, :], ci_l[0, :])
      inf = np.empty_like(ci_l[0, :])
      inf.fill(np.inf)
      assert_equal(inf, ci_l[1, :])
      assert_equal(-1 * inf, ci_u[0, :])
  
imports: from __future__ import annotations
  import copy
  from typing import Callable, NamedTuple
  import warnings
  import numpy
  from numpy.random import RandomState
  from numpy.testing import assert_allclose, assert_equal
  import pandas
  from pandas.testing import assert_frame_equal, assert_series_equal
  import pytest
  import scipy.stats
  from arch.bootstrap import CircularBlockBootstrap, IIDBootstrap, IndependentSamplesBootstrap, MovingBlockBootstrap, StationaryBootstrap
  from arch.bootstrap._samplers_python import stationary_bootstrap_sample
  from arch.bootstrap._samplers_python import stationary_bootstrap_sample_python
  from arch.bootstrap.base import _loo_jackknife
  from arch.utility.exceptions import StudentizationError
label_desc: Use image node_id 8 for calling a global function with example usage: test_conf_int_basic(bs_setup) without return types