code: def test_percentile(self):
      for size in (1, 100):
          q = np.random.randint(0, 100, size=size)
          results = []
          for idx, p in enumerate(TEST_NDARRAYS):
              dtype = [np.float32, float][idx % 2]
              arr = p(
                  np.arange(100 * 101)
                  .reshape(1, 100, 101)
                  .astype(dtype)
              )
              results.append(percentile(arr, q))
              assert_allclose(
                  results[0],
                  results[-1],
                  type_test=False,
                  atol=1e-4,
                  rtol=1e-4,
              )
  
file_path: MONAI/tests/test_utils_pytorch_numpy_unification.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.transforms.utils_pytorch_numpy_unification import mode, percentile
  from monai.utils import set_determinism
  from tests.utils import TEST_NDARRAYS, assert_allclose, skip_if_quick
label_desc: Use image node_id 2 for calling the TestPytorchNumpyUnification obj's underlying member method code with example usage: obj.test_percentile() without return types