code: def compute_suggested_patch_radius(arr, patch_size):
      """Compute the suggested patch radius.
  
      Parameters
      ----------
      arr : ndarray
          Data to be denoised.
      patch_size : ndarray
          Patch size.
  
      Returns
      -------
      int
          Suggested patch radius.
      """
  
      tmp = np.sum(
          patch_size == 1
      )  # count spatial dimensions with size 1
      if tmp == 0:
          root = np.ceil(arr.shape[-1] ** (1.0 / 3))  # 3D
      if tmp == 1:
          root = np.ceil(arr.shape[-1] ** (1.0 / 2))  # 2D
      if tmp == 2:
          root = arr.shape[-1]  # 1D
      root = root + 1 if (root % 2) == 0 else root  # make odd
  
      return int((root - 1) / 2)
  
file_path: dipy/dipy/denoise/localpca.py
imports: import copy
  from packaging.version import Version
  from warnings import warn
  import numpy
  import scipy
  from scipy.linalg import eigh
  from dipy.denoise.pca_noise_estimate import pca_noise_estimate
label_desc: Use image node_id 6 for calling a global function with example usage: compute_suggested_patch_radius(arr, patch_size) and returns: int