code: def test_Wrotate_single_fiber():
      # Rotate the kurtosis tensor of single fiber simulate to the diffusion
      # tensor diagonal and check that is equal to the kurtosis tensor of the
      # same single fiber simulated directly to the x-axis
  
      # Define single fiber simulate
      mevals = np.array([[0.00099, 0, 0], [0.00226, 0.00087, 0.00087]])
      fie = 0.49
      frac = [fie * 100, (1 - fie) * 100]
  
      # simulate single fiber not aligned to the x-axis
      theta = random.uniform(0, 180)
      phi = random.uniform(0, 320)
      angles = [(theta, phi), (theta, phi)]
      signal, dt, kt = multi_tensor_dki(
          gtab_2s, mevals, angles=angles, fractions=frac, snr=None
      )
  
      evals, evecs = decompose_tensor(from_lower_triangular(dt))
  
      kt_rotated = dki.Wrotate(kt, evecs)
      # Now coordinate system has the DT diagonal aligned to the x-axis
  
      # Reference simulation in which DT diagonal is directly aligned to the
      # x-axis
      angles = (90, 0), (90, 0)
      signal, dt_ref, kt_ref = multi_tensor_dki(
          gtab_2s, mevals, angles=angles, fractions=frac, snr=None
      )
  
      assert_array_almost_equal(kt_rotated, kt_ref)
  
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 10 for calling a global function with example usage: test_Wrotate_single_fiber() without return types