code: def test_conf_int_parametric(bs_setup):
      def param_func(x, params=None, state=None):
          if state is not None:
              mu = params
              e = state.standard_normal(x.shape)
              return (mu + e).mean(0)
          else:
              return x.mean(0)
  
      def semi_func(x, params=None):
          if params is not None:
              mu = params
              e = x - mu
              return (mu + e).mean(0)
          else:
              return x.mean(0)
  
      reps = 100
      bs = IIDBootstrap(bs_setup.x)
  
      ci = bs.conf_int(
          func=param_func, reps=reps, sampling="parametric"
      )
      assert len(ci) == 2
      assert np.all(ci[0] < ci[1])
      bs.reset()
      results = np.zeros((reps, 2))
      count = 0
      mu = bs_setup.x.mean(0)
      for pos, _ in bs.bootstrap(100):
          results[count] = param_func(
              *pos, params=mu, state=bs.generator
          )
          count += 1
      assert_equal(bs._results, results)
  
      bs.reset()
      ci = bs.conf_int(func=semi_func, reps=100, sampling="semi")
      assert len(ci) == 2
      assert np.all(ci[0] < ci[1])
      bs.reset()
      results = np.zeros((reps, 2))
      count = 0
      for pos, _ in bs.bootstrap(100):
          results[count] = semi_func(*pos, params=mu)
          count += 1
      assert_allclose(bs._results, results)
  
      with pytest.raises(ValueError, match="sampling must be one"):
          bs.conf_int(func=semi_func, reps=100, sampling="other")
  
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 15 for calling a global function with example usage: test_conf_int_parametric(bs_setup) and returns: unknown, x, unknown, x