code: def test_ascm_random_noise(rng):
      S0 = 100 + 2 * rng.standard_normal((22, 23, 30))
      S0n1 = non_local_means(
          S0, sigma=1, rician=False, patch_radius=1, block_radius=1
      )
      S0n2 = non_local_means(
          S0, sigma=1, rician=False, patch_radius=2, block_radius=1
      )
      S0n = adaptive_soft_matching(S0, S0n1, S0n2, 1)
  
      print(S0.mean(), S0.min(), S0.max())
      print(S0n.mean(), S0n.min(), S0n.max())
  
      assert_(S0n.min() > S0.min())
      assert_(S0n.max() < S0.max())
      assert_equal(np.round(S0n.mean()), 100)
  
file_path: dipy/dipy/denoise/tests/test_ascm.py
imports: import numpy
  import dipy.data
  import nibabel
  from numpy.testing import assert_, assert_equal, assert_array_almost_equal
  from dipy.denoise.non_local_means import non_local_means
  from dipy.denoise.noise_estimate import estimate_sigma
  from dipy.denoise.adaptive_soft_matching import adaptive_soft_matching
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 2 for calling a global function with example usage: test_ascm_random_noise(rng) without return types