code: def test_channel_wise(self):
      img = np.tile(self.imt, (3, 1, 1, 1))
      lower = 10
      upper = 99
      b_min = 0
      b_max = 255
      scaler = ScaleIntensityRangePercentilesd(
          keys="img",
          lower=lower,
          upper=upper,
          b_min=b_min,
          b_max=b_max,
          channel_wise=True,
          dtype=np.uint8,
      )
      expected = []
      for c in img:
          a_min = np.percentile(c, lower)
          a_max = np.percentile(c, upper)
          expected.append(
              (
                  ((c - a_min) / (a_max - a_min)) * (b_max - b_min)
                  + b_min
              ).astype(np.uint8)
          )
      expected = np.stack(expected)
  
      for p in TEST_NDARRAYS:
          data = {"img": p(img)}
          assert_allclose(
              scaler(data)["img"],
              p(expected),
              type_test="tensor",
              rtol=1e-4,
          )
  
file_path: MONAI/tests/test_scale_intensity_range_percentilesd.py
imports: from __future__ import annotations
  import unittest
  import numpy
  from monai.transforms.intensity.dictionary import ScaleIntensityRangePercentilesd
  from tests.utils import TEST_NDARRAYS, NumpyImageTestCase2D, assert_allclose
label_desc: Use image node_id 4 for calling the TestScaleIntensityRangePercentilesd obj's underlying member method code with example usage: obj.test_channel_wise() without return types