code: def test_nlmeans_4D_and_mask():
      S0 = 200 * np.ones((20, 20, 20, 3), dtype="f8")
      mask = np.zeros((20, 20, 20))
      mask[10, 10, 10] = 1
      S0n = non_local_means(S0, sigma=1, mask=mask, rician=True)
      assert_equal(S0.shape, S0n.shape)
      assert_equal(np.round(S0n[10, 10, 10]), 200)
      assert_equal(S0n[8, 8, 8], 0)
  
file_path: dipy/dipy/denoise/tests/test_non_local_means.py
imports: import numpy
  from numpy.testing import assert_, assert_equal, assert_array_almost_equal, assert_raises
  from dipy.denoise.non_local_means import non_local_means
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 6 for calling a global function with example usage: test_nlmeans_4D_and_mask() without return types