code: def test_lpca_boundary_behaviour(rng):
      # check is first slice is getting denoised or not ?
      S0 = 100 * np.ones((20, 20, 20, 20), dtype="f8")
      S0[:, :, 0, :] = S0[:, :, 0, :] + 2 * rng.standard_normal(
          (20, 20, 20)
      )
      S0_first = S0[:, :, 0, :]
      S0ns = localpca(S0, sigma=np.std(S0))
      S0ns_first = S0ns[:, :, 0, :]
      rmses = np.sum(np.abs(S0ns_first - S0_first)) / (
          100.0 * 20.0 * 20.0 * 20.0
      )
  
      # shows that S0n_first is not very close to S0_first
      assert_(rmses > 0.0001)
      assert_equal(np.round(S0ns_first.mean()), 100)
  
      rmses = np.sum(np.abs(S0ns_first - S0_first)) / (
          100.0 * 20.0 * 20.0 * 20.0
      )
  
      # shows that S0n_first is not very close to S0_first
      assert_(rmses > 0.0001)
      assert_equal(np.round(S0ns_first.mean()), 100)
  
imports: import warnings
  import numpy
  import scipy.special
  from numpy.testing import assert_, assert_equal, assert_raises, assert_array_almost_equal, assert_warns
  from dipy.denoise.localpca import dimensionality_problem_message, create_patch_radius_arr, compute_patch_size, compute_num_samples, compute_suggested_patch_radius, localpca, mppca, genpca, _pca_classifier
  from dipy.sims.voxel import multi_tensor
  from dipy.core.gradients import gradient_table, generate_bvecs
  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_lpca_boundary_behaviour(rng) without return types