code: def test_compare_MK_method():
      # tests if analytical solution of MK is equal to the average of directional
      # kurtosis sampled from a sphere
  
      # DKI Model fitting
      dkiM = dki.DiffusionKurtosisModel(gtab_2s)
      dkiF = dkiM.fit(signal_cross)
  
      # MK analytical solution
      MK_as = dkiF.mk(None, None, analytical=True)
  
      # MK numerical method
      MK_nm = dkiF.mk(None, None, analytical=False)
  
      assert_array_almost_equal(MK_as, MK_nm, decimal=3)
  
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 14 for calling a global function with example usage: test_compare_MK_method() without return types