code: def test_spherical_dki_statistics():
      # tests if MK, AK, RK and MSK are equal to expected values of a spherical
      # kurtosis tensor
  
      # Define multi voxel spherical kurtosis simulations
      MParam = np.zeros((2, 2, 2, 27))
      MParam[0, 0, 0] = MParam[0, 0, 1] = MParam[0, 1, 0] = params_sph
      MParam[0, 1, 1] = MParam[1, 1, 0] = params_sph
      # MParam[1, 1, 1], MParam[1, 0, 0], and MParam[1, 0, 1] remains zero
  
      MRef = np.zeros((2, 2, 2))
      MRef[0, 0, 0] = MRef[0, 0, 1] = MRef[0, 1, 0] = Kref_sphere
      MRef[0, 1, 1] = MRef[1, 1, 0] = Kref_sphere
      MRef[1, 1, 1] = MRef[1, 0, 0] = MRef[1, 0, 1] = 0
  
      # Mean kurtosis analytical solution
      MK_multi = mean_kurtosis(MParam, analytical=True)
      assert_array_almost_equal(MK_multi, MRef)
  
      # radial kurtosis analytical solution
      RK_multi = radial_kurtosis(MParam, analytical=True)
      assert_array_almost_equal(RK_multi, MRef)
  
      # axial kurtosis analytical solution
      AK_multi = axial_kurtosis(MParam, analytical=True)
      assert_array_almost_equal(AK_multi, MRef)
  
      # mean kurtosis tensor analytical solution
      MSK_multi = mean_kurtosis_tensor(MParam)
      assert_array_almost_equal(MSK_multi, MRef)
  
      # kurtosis fractional anisotropy (isotropic case kfa=0)
      KFA_multi = kurtosis_fractional_anisotropy(MParam)
      assert_array_almost_equal(KFA_multi, 0 * MRef)
  
imports: import numpy
  import random
  import dipy.reconst.dki
  import dipy.reconst.dti
  from numpy.testing import assert_array_almost_equal, assert_array_equal, assert_almost_equal, assert_raises
  from dipy.sims.voxel import multi_tensor_dki
  from dipy.io.gradients import read_bvals_bvecs
  from dipy.core.gradients import gradient_table
  from dipy.data import get_fnames
  from dipy.reconst.dti import from_lower_triangular, decompose_tensor
  from dipy.reconst.dki import mean_kurtosis, carlson_rf, carlson_rd, axial_kurtosis, radial_kurtosis, mean_kurtosis_tensor, _positive_evals, lower_triangular, kurtosis_fractional_anisotropy
  from dipy.core.sphere import Sphere
  from dipy.data import default_sphere
  from dipy.core.geometry import sphere2cart
  from dipy.utils.optpkg import optional_package
  from dipy.utils.tripwire import TripWireError
label_desc: Use image node_id 13 for calling a global function with example usage: test_spherical_dki_statistics() without return types