code: def test_create_patch_radius_arr(rng):
      shape = (10, 10, 8, 104)
      arr = rng.standard_normal(shape)
      pr = 2
      expected_val = np.asarray([2, 2, 2])
      obtained_val = create_patch_radius_arr(arr, pr)
      assert np.array_equal(obtained_val, expected_val)
  
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 17 for calling a global function with example usage: test_create_patch_radius_arr(rng) without return types