code: def test_percentile_along_axis():
      # the difference between _percentile_along_axis and np.percentile is that
      # np.percentile gets _all_ the qs for each axis slice, whereas
      # _percentile_along_axis gets the q corresponding with each axis slice
  
      shape = 10, 20
      np.random.seed(0)
      x = np.random.rand(*shape)
      q = np.random.rand(*shape[:-1]) * 100
      y = _bootstrap._percentile_along_axis(x, q)
  
      for i in range(shape[0]):
          res = y[i]
          expected = np.percentile(x[i], q[i], axis=-1)
          assert_allclose(res, expected, 1e-15)
  
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 14 for calling a global function with example usage: test_percentile_along_axis() without return types