code: def test_dki_micro_predict_single_voxel():
      # single fiber simulate (which is the assumption of our model)
      fie = 0.49
      ADi = 0.00099
      ADe = 0.00226
      RDi = 0
      RDe = 0.00087
  
      # prepare simulation:
      theta = random.uniform(0, 180)
      phi = random.uniform(0, 320)
      angles = [(theta, phi), (theta, phi)]
      mevals = np.array([[ADi, RDi, RDi], [ADe, RDe, RDe]])
      frac = [fie * 100, (1 - fie) * 100]
      signal, dt, kt = multi_tensor_dki(
          gtab_2s, mevals, angles=angles, fractions=frac, snr=None
      )
      signal_gt, da = multi_tensor(
          gtab_2s, mevals, angles=angles, fractions=frac, snr=None
      )
  
      # Defined DKI microstrutural model
      dkiM = dki_micro.KurtosisMicrostructureModel(gtab_2s)
  
      # Fit single voxel signal
      dkiF = dkiM.fit(signal)
  
      # Check predict of KurtosisMicrostruturalModel
      pred = dkiM.predict(dkiF.model_params)
      assert_array_almost_equal(pred, signal_gt, decimal=4)
  
      pred = dkiM.predict(dkiF.model_params, S0=100)
      assert_array_almost_equal(pred, signal_gt * 100, decimal=4)
  
      # Check predict of KurtosisMicrostruturalFit
      pred = dkiF.predict(gtab_2s, S0=100)
      assert_array_almost_equal(pred, signal_gt * 100, decimal=4)
  
file_path: dipy/dipy/reconst/tests/test_dki_micro.py
imports: import numpy
  import random
  import dipy.reconst.dki_micro
  from numpy.testing import assert_array_almost_equal, assert_almost_equal, assert_, assert_raises, assert_allclose
  from dipy.sims.voxel import multi_tensor_dki, _check_directions, multi_tensor
  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 eig_from_lo_tri
  from dipy.data import default_sphere, get_sphere
label_desc: Use image node_id 5 for calling a global function with example usage: test_dki_micro_predict_single_voxel() without return types