code: def test_ascm_accuracy():
      f_name = dpd.get_fnames("ascm_test")
      test_ascm_data_ref = np.asanyarray(nib.load(f_name).dataobj)
      test_data = np.asanyarray(
          nib.load(dpd.get_fnames("aniso_vox")).dataobj
      )
  
      # the test data was constructed in this manner
      mask = test_data > 50
      sigma = estimate_sigma(test_data, N=4).item()
  
      den_small = non_local_means(
          test_data,
          sigma=sigma,
          mask=mask,
          patch_radius=1,
          block_radius=1,
          rician=True,
      )
  
      den_large = non_local_means(
          test_data,
          sigma=sigma,
          mask=mask,
          patch_radius=2,
          block_radius=1,
          rician=True,
      )
  
      S0n = np.array(
          adaptive_soft_matching(test_data, den_small, den_large, sigma)
      )
  
      assert_array_almost_equal(S0n, test_ascm_data_ref, decimal=4)
  
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 5 for calling a global function with example usage: test_ascm_accuracy() without return types