code: def test_jackknife_resample():
      shape = 3, 4, 5, 6
      np.random.seed(0)
      x = np.random.rand(*shape)
      y = next(_bootstrap._jackknife_resample(x))
  
      for i in range(shape[-1]):
          # each resample is indexed along second to last axis
          # (last axis is the one the statistic will be taken over / consumed)
          slc = y[..., i, :]
          expected = np.delete(x, i, axis=-1)
  
          assert np.array_equal(slc, expected)
  
      y2 = np.concatenate(
          list(_bootstrap._jackknife_resample(x, batch=2)), axis=-2
      )
      assert np.array_equal(y2, y)
  
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 11 for calling a global function with example usage: test_jackknife_resample() without return types