code: def shore_order(n, l, m):
      r"""Given the indices (n,l,m) of the basis, return the minimum order
      for those indices and their index for modified Merlet's 3D-SHORE.
  
      Parameters
      ----------
      n :  unsigned int
          the index n of the modified shore basis
      l :  unsigned int
          the index l of the modified shore basis
      m :  unsigned int
          the index m of the modified shore basis
  
      Returns
      -------
      radial_order : unsigned int
          an even integer that represent the maximal order of the basis
      index : unsigned int
          index of the coefficient corresponding to (n,l,m), start from 0
  
      """
      if l % 2 == 1 or l > n or l < 0 or n < 0 or np.abs(m) > l:
          msg = "The index l must be even and 0 <= l <= n, the index m must be "
          msg += "-l <= m <= l. Given values were"
          msg += " [n,l,m]=[%s]." % ",".join([str(n), str(l), str(m)])
          raise ValueError(msg)
      else:
          if n % 2 == 1:
              radial_order = n + 1
          else:
              radial_order = n
  
          counter_i = 0
  
          counter = 0
          for l_i in range(0, radial_order + 1, 2):
              for n_i in range(l_i, int((radial_order + l_i) / 2) + 1):
                  for m_i in range(-l_i, l_i + 1):
                      if n == n_i and l == l_i and m == m_i:
                          counter_i = counter
                      counter += 1
  
      return radial_order, counter_i
  
imports: from warnings import warn
  from math import factorial
  import numpy
  from scipy.special import genlaguerre, gamma, hyp2f1
  from dipy.reconst.cache import Cache
  from dipy.reconst.multi_voxel import multi_voxel_fit
  from dipy.reconst.shm import real_sh_descoteaux_from_index
  from dipy.core.geometry import cart2sphere
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 11 for calling a global function with example usage: shore_order(n, l, m) and returns: radial_order,  counter_i