code: def tortuosity(hindered_ad, hindered_rd):
      """Computes the tortuosity of the hindered diffusion compartment given
      its axial and radial diffusivities
  
      Parameters
      ----------
      hindered_ad: ndarray
          Array containing the values of the hindered axial diffusivity.
      hindered_rd: ndarray
          Array containing the values of the hindered radial diffusivity.
  
      Returns
      -------
      Tortuosity of the hindered diffusion compartment
      """
      if not isinstance(hindered_rd, np.ndarray):
          hindered_rd = np.array(hindered_rd)
      if not isinstance(hindered_ad, np.ndarray):
          hindered_ad = np.array(hindered_ad)
  
      tortuosity = np.zeros(hindered_rd.shape)
  
      # mask to avoid divisions by zero
      mask = hindered_rd > 0
  
      # Check single voxel cases. For numpy versions more recent than 1.7,
      # this if else condition is not required since single voxel can be
      # processed using the same line of code of multi-voxel
      if hindered_rd.size == 1:
          if mask:
              tortuosity = hindered_ad / hindered_rd
      else:
          tortuosity[mask] = hindered_ad[mask] / hindered_rd[mask]
  
      return tortuosity
  
imports: import numpy
  from dipy.reconst.dti import lower_triangular, from_lower_triangular, decompose_tensor, trace, mean_diffusivity, radial_diffusivity, axial_diffusivity, MIN_POSITIVE_SIGNAL
  from dipy.reconst.dki import split_dki_param, _positive_evals, directional_kurtosis, directional_diffusion, kurtosis_maximum, DiffusionKurtosisModel, DiffusionKurtosisFit
  from dipy.reconst.dti import design_matrix
  from dipy.core.ndindex import ndindex
  from dipy.reconst.vec_val_sum import vec_val_vect
  from dipy.data import get_sphere
  import dipy.core.sphere
label_desc: Use image node_id 4 for calling a global function with example usage: tortuosity(hindered_ad, hindered_rd) and returns: tortuosity