code: def test_pandas(bs_setup, seed):
      x, y, z = bs_setup.x_df, bs_setup.y_series, bs_setup.z_df
      bs = IIDBootstrap(y, seed=seed)
      for data, kwdata in bs.bootstrap(10):
          index = bs.index
          assert_equal(len(kwdata.keys()), 0)
          assert_series_equal(y.iloc[index], data[0])
      # Ensure no changes to original data
      assert_series_equal(bs._args[0], y)
  
      bs = IIDBootstrap(y=y, seed=seed)
      for data, kwdata in bs.bootstrap(10):
          index = bs.index
          assert_equal(len(data), 0)
          assert_series_equal(y.iloc[index], kwdata["y"])
          assert_series_equal(y.iloc[index], bs.y)
      # Ensure no changes to original data
      assert_series_equal(bs._kwargs["y"], y)
  
      bs = IIDBootstrap(x, y, z, seed=seed)
      for data, kwdata in bs.bootstrap(10):
          index = bs.index
          assert_equal(len(data), 3)
          assert_equal(len(kwdata.keys()), 0)
          assert_frame_equal(x.iloc[index], data[0])
          assert_series_equal(y.iloc[index], data[1])
          assert_frame_equal(z.iloc[index], data[2])
  
      bs = IIDBootstrap(x, y=y, z=z, seed=seed)
      for data, kwdata in bs.bootstrap(10):
          index = bs.index
          assert_equal(len(data), 1)
          assert_equal(len(kwdata.keys()), 2)
          assert_frame_equal(x.iloc[index], data[0])
          assert_series_equal(y.iloc[index], kwdata["y"])
          assert_frame_equal(z.iloc[index], kwdata["z"])
          assert_series_equal(y.iloc[index], bs.y)
          assert_frame_equal(z.iloc[index], bs.z)
  
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 4 for calling a global function with example usage: test_pandas(bs_setup, seed) without return types