code: def test_bootstrap_iv():
      message = "`data` must be a sequence of samples."
      with pytest.raises(ValueError, match=message):
          bootstrap(1, np.mean)
  
      message = "`data` must contain at least one sample."
      with pytest.raises(ValueError, match=message):
          bootstrap(tuple(), np.mean)
  
      message = "each sample in `data` must contain two or more observations..."
      with pytest.raises(ValueError, match=message):
          bootstrap(([1, 2, 3], [1]), np.mean)
  
      message = "When `paired is True`, all samples must have the same length "
      with pytest.raises(ValueError, match=message):
          bootstrap(([1, 2, 3], [1, 2, 3, 4]), np.mean, paired=True)
  
      message = "`vectorized` must be `True` or `False`."
      with pytest.raises(ValueError, match=message):
          bootstrap(1, np.mean, vectorized="ekki")
  
      message = "`axis` must be an integer."
      with pytest.raises(ValueError, match=message):
          bootstrap(([1, 2, 3],), np.mean, axis=1.5)
  
      message = "could not convert string to float"
      with pytest.raises(ValueError, match=message):
          bootstrap(([1, 2, 3],), np.mean, confidence_level="ni")
  
      message = "`n_resamples` must be a positive integer."
      with pytest.raises(ValueError, match=message):
          bootstrap(([1, 2, 3],), np.mean, n_resamples=-1000)
  
      message = "`n_resamples` must be a positive integer."
      with pytest.raises(ValueError, match=message):
          bootstrap(([1, 2, 3],), np.mean, n_resamples=1000.5)
  
      message = "`batch` must be a positive integer or None."
      with pytest.raises(ValueError, match=message):
          bootstrap(([1, 2, 3],), np.mean, batch=-1000)
  
      message = "`batch` must be a positive integer or None."
      with pytest.raises(ValueError, match=message):
          bootstrap(([1, 2, 3],), np.mean, batch=1000.5)
  
      message = "`method` must be in"
      with pytest.raises(ValueError, match=message):
          bootstrap(([1, 2, 3],), np.mean, method="ekki")
  
      message = (
          "`method = 'BCa' is only available for one-sample statistics"
      )
  
      def statistic(x, y, axis):
          mean1 = np.mean(x, axis)
          mean2 = np.mean(y, axis)
          return mean1 - mean2
  
      with pytest.raises(ValueError, match=message):
          bootstrap(
              ([0.1, 0.2, 0.3], [0.1, 0.2, 0.3]),
              statistic,
              method="BCa",
          )
  
      message = "'herring' cannot be used to seed a"
      with pytest.raises(ValueError, match=message):
          bootstrap(([1, 2, 3],), np.mean, random_state="herring")
  
imports: import numpy
  import pytest
  from scipy.stats import bootstrap
  from numpy.testing import assert_allclose, assert_equal
  from scipy import stats
  from scipy.stats import _bootstrap
  from scipy._lib._util import rng_integers
label_desc: Use image node_id 1 for calling a global function with example usage: test_bootstrap_iv() and returns: unknown