code: def test_channel_wise(self):
      key = "img"
      for p in TEST_NDARRAYS:
          scaler = RandShiftIntensityd(
              keys=[key], offsets=3.0, prob=1.0, channel_wise=True
          )
          scaler.set_random_state(seed=0)
          result = scaler({key: p(self.imt)})
          np.random.seed(0)
          # simulate the randomize function of transform
          np.random.random()
          channel_num = self.imt.shape[0]
          factor = [
              np.random.uniform(low=-3.0, high=3.0)
              for _ in range(channel_num)
          ]
          expected = p(
              np.stack(
                  [
                      np.asarray((self.imt[i]) + factor[i])
                      for i in range(channel_num)
                  ]
              ).astype(np.float32)
          )
          assert_allclose(result[key], p(expected), type_test="tensor")
  
file_path: MONAI/tests/test_rand_shift_intensityd.py
imports: from __future__ import annotations
  import unittest
  import numpy
  from monai.transforms import IntensityStatsd, RandShiftIntensityd
  from monai.utils.enums import PostFix
  from tests.utils import TEST_NDARRAYS, NumpyImageTestCase2D, assert_allclose
label_desc: Use image node_id 3 for calling the TestRandShiftIntensityd obj's underlying member method code with example usage: obj.test_channel_wise() without return types