code: def test_nlmeans_random_noise(rng):
      S0 = 100 + 2 * rng.standard_normal((22, 23, 30))
  
      S0n = nlmeans(
          S0, sigma=np.ones((22, 23, 30)) * np.std(S0), rician=False
      )
  
      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_nlmeans.py
imports: from time import time
  import numpy
  from numpy.testing import assert_, assert_equal, assert_array_almost_equal, assert_raises
  import pytest
  from dipy.denoise.nlmeans import nlmeans
  from dipy.denoise.denspeed import add_padding_reflection, remove_padding
  from dipy.utils.omp import cpu_count, have_openmp
  from dipy.testing import assert_greater
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 4 for calling a global function with example usage: test_nlmeans_random_noise(rng) without return types