code: def test_smt2_metrics():
      # Just checking if parameters can be retrieved from MSDKI's fit class obj
  
      # Based on the multi-voxel simulations above (computes gt for SMT2 params)
      AWFgt = awf_from_msk(MKgt_multi)
      DIgt = 3 * MDgt_multi / (1 + 2 * (1 - AWFgt) ** 2)
      # General microscopic anisotropy estimation (Eq 8 Henriques et al MRM 2019)
      RDe = DIgt * (1 - AWFgt)  # tortuosity assumption
      VarD = (
          2 / 9 * (AWFgt * DIgt**2 + (1 - AWFgt) * (DIgt - RDe) ** 2)
      )
      MD = (AWFgt * DIgt + (1 - AWFgt) * (DIgt + 2 * RDe)) / 3
      uFAgt = np.sqrt(
          3 / 2 * VarD[MD > 0] / (VarD[MD > 0] + MD[MD > 0] ** 2)
      )
  
      mdkiM = msdki.MeanDiffusionKurtosisModel(gtab_3s)
      mdkiF = mdkiM.fit(DWI)
      assert_array_almost_equal(mdkiF.smt2f, AWFgt)
      assert_array_almost_equal(mdkiF.smt2di, DIgt)
      assert_array_almost_equal(mdkiF.smt2uFA[MD > 0], uFAgt)
  
      # Check if awf_from_msk when mask is given
      mask = MKgt_multi > 0
      AWF = awf_from_msk(MKgt_multi, mask)
      assert_array_almost_equal(AWF, AWFgt)
  
file_path: dipy/dipy/reconst/tests/test_msdki.py
imports: import numpy
  import random
  from numpy.testing import assert_array_almost_equal, assert_raises, assert_almost_equal, assert_
  from dipy.sims.voxel import single_tensor, multi_tensor_dki
  from dipy.io.gradients import read_bvals_bvecs
  from dipy.core.gradients import gradient_table, unique_bvals_magnitude, round_bvals
  from dipy.data import get_fnames
  import dipy.reconst.msdki
  from dipy.reconst.msdki import msk_from_awf, awf_from_msk
label_desc: Use image node_id 9 for calling a global function with example usage: test_smt2_metrics() without return types