code: def directional_kurtosis(
      dt,
      md,
      kt,
      V,
      min_diffusivity=0,
      min_kurtosis=-3 / 7,
      adc=None,
      adv=None,
  ):
      r"""Calculate the apparent kurtosis coefficient (akc) in each direction of
      a sphere for a single voxel [1]_
  
      Parameters
      ----------
      dt : array (6,)
          elements of the diffusion tensor of the voxel.
      md : float
          mean diffusivity of the voxel
      kt : array (15,)
          elements of the kurtosis tensor of the voxel.
      V : array (g, 3)
          g directions of a Sphere in Cartesian coordinates
      min_diffusivity : float (optional)
          Because negative eigenvalues are not physical and small eigenvalues
          cause quite a lot of noise in diffusion-based metrics, diffusivity
          values smaller than `min_diffusivity` are replaced with
          `min_diffusivity`. Default = 0
      min_kurtosis : float (optional)
          Because high-amplitude negative values of kurtosis are not physically
          and biologicaly pluasible, and these cause artefacts in
          kurtosis-based measures, directional kurtosis values smaller than
          `min_kurtosis` are replaced with `min_kurtosis`. Default = -3./7
          (theoretical kurtosis limit for regions that consist of water confined
          to spherical pores [2]_)
      adc : ndarray(g,) (optional)
          Apparent diffusion coefficient (adc) in all g directions of a sphere
          for a single voxel.
      adv : ndarray(g,) (optional)
          Apparent diffusion variance (advc) in all g directions of a sphere for
          a single voxel.
  
      Returns
      -------
      akc : ndarray (g,)
          Apparent kurtosis coefficient (AKC) in all g directions of a sphere for
          a single voxel.
  
      References
      ----------
      .. [1] Neto Henriques R, Correia MM, Nunes RG, Ferreira HA (2015).
             Exploring the 3D geometry of the diffusion kurtosis tensor -
             Impact on the development of robust tractography procedures and
             novel biomarkers, NeuroImage 111: 85-99
      .. [2] Barmpoutis, A., & Zhuo, J., 2011. Diffusion kurtosis imaging:
             Robust estimation from DW-MRI using homogeneous polynomials.
             Proceedings of the 8th {IEEE} International Symposium on
             Biomedical Imaging: From Nano to Macro, ISBI 2011, 262-265.
             doi: 10.1109/ISBI.2011.5872402
  
      """
      if adc is None:
          adc = directional_diffusion(
              dt, V, min_diffusivity=min_diffusivity
          )
      if adv is None:
          adv = directional_diffusion_variance(kt, V)
  
      akc = adv * (md / adc) ** 2
  
      if min_kurtosis is not None:
          akc = akc.clip(min=min_kurtosis)
  
      return akc
  
imports: import numpy
  import warnings
  import scipy.optimize
  import dipy.core.sphere
  from dipy.reconst.multi_voxel import multi_voxel_fit
  from dipy.reconst.dti import TensorFit, mean_diffusivity, from_lower_triangular, lower_triangular, decompose_tensor, MIN_POSITIVE_SIGNAL, nlls_fit_tensor, restore_fit_tensor
  from dipy.reconst.utils import dki_design_matrix
  from dipy.reconst.recspeed import local_maxima
  from dipy.reconst.base import ReconstModel
  from dipy.core.ndindex import ndindex
  from dipy.core.geometry import sphere2cart, cart2sphere, perpendicular_directions
  from dipy.core.optimize import PositiveDefiniteLeastSquares
  from dipy.data import get_sphere, get_fnames, load_sdp_constraints
  from dipy.reconst.vec_val_sum import vec_val_vect
  from dipy.core.gradients import check_multi_b
label_desc: Use image node_id 8 for calling a global function with example usage: directional_kurtosis(dt, md, kt, V, min_diffusivity, min_kurtosis, adc, adv) and returns: akc