code: def test_bootstrap_against_R(method, expected):
      # Compare against R's "boot" library
      # library(boot)
  
      # stat <- function (x, a) {
      #     mean(x[a])
      # }
  
      # x <- c(10, 12, 12.5, 12.5, 13.9, 15, 21, 22,
      #        23, 34, 50, 81, 89, 121, 134, 213)
  
      # # Use a large value so we get a few significant digits for the CI.
      # n = 1000000
      # bootresult = boot(x, stat, n)
      # result <- boot.ci(bootresult)
      # print(result)
      x = np.array(
          [
              10,
              12,
              12.5,
              12.5,
              13.9,
              15,
              21,
              22,
              23,
              34,
              50,
              81,
              89,
              121,
              134,
              213,
          ]
      )
      res = bootstrap(
          (x,),
          np.mean,
          n_resamples=1000000,
          method=method,
          random_state=0,
      )
      assert_allclose(res.confidence_interval, expected, rtol=0.005)
  
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 6 for calling a global function with example usage: test_bootstrap_against_R(method, expected) without return types