code: def test_fixed_mean_preserve_range(self, p):
      for channel_wise in [False, True]:
          factor = 0.9
          scaler = ScaleIntensityFixedMean(
              factor=factor,
              preserve_range=True,
              fixed_mean=True,
              channel_wise=channel_wise,
          )
          im = p(self.imt)
          clip_min = im.min()
          clip_max = im.max()
          result = scaler(im)
          mn = im.mean()
          im = im - mn
          expected = (1 + factor) * im
          expected = expected + mn
          expected[expected < clip_min] = clip_min
          expected[expected > clip_max] = clip_max
          assert_allclose(
              result, expected, type_test="tensor", atol=1e-7
          )
  
file_path: MONAI/tests/test_scale_intensity_fixed_mean.py
imports: from __future__ import annotations
  import unittest
  import numpy
  from parameterized import parameterized
  from monai.transforms import ScaleIntensityFixedMean
  from tests.utils import TEST_NDARRAYS, NumpyImageTestCase2D, assert_allclose
label_desc: Use image node_id 4 for calling the TestScaleIntensityFixedMean obj's underlying member method code with example usage: obj.test_fixed_mean_preserve_range(p) without return types