code: def test_bootstrap_vectorized_3samp(method, axis):
      def statistic(*data, axis=0):
          # an arbitrary, vectorized statistic
          return sum((sample.mean(axis) for sample in data))
  
      def statistic_1d(*data):
          # the same statistic, not vectorized
          for sample in data:
              assert sample.ndim == 1
          return statistic(*data, axis=0)
  
      np.random.seed(0)
      x = np.random.rand(4, 5)
      y = np.random.rand(4, 5)
      z = np.random.rand(4, 5)
      res1 = bootstrap(
          (x, y, z),
          statistic,
          vectorized=True,
          axis=axis,
          n_resamples=100,
          method=method,
          random_state=0,
      )
      res2 = bootstrap(
          (x, y, z),
          statistic_1d,
          vectorized=False,
          axis=axis,
          n_resamples=100,
          method=method,
          random_state=0,
      )
      assert_allclose(
          res1.confidence_interval, res2.confidence_interval
      )
      assert_allclose(res1.standard_error, res2.standard_error)
  
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 9 for calling a global function with example usage: test_bootstrap_vectorized_3samp(method, axis) and returns: sum, statistic