code: def test_Wrotate_crossing_fibers():
      # Test 2 - simulate crossing fibers intersecting at 70 degrees.
      # In this case, diffusion tensor principal eigenvector will be aligned in
      # the middle of the crossing fibers. Thus, after rotating the kurtosis
      # tensor, this will be equal to a kurtosis tensor simulate of crossing
      # fibers both deviating 35 degrees from the x-axis. Moreover, we know that
      # crossing fibers will be aligned to the x-y plane, because the smaller
      # diffusion eigenvalue, perpendicular to both crossings fibers, will be
      # aligned to the z-axis.
  
      # Simulate the crossing fiber
      angles = [(90, 30), (90, 30), (20, 30), (20, 30)]
      fie = 0.49
      frac = [fie * 50, (1 - fie) * 50, fie * 50, (1 - fie) * 50]
      mevals = np.array(
          [
              [0.00099, 0, 0],
              [0.00226, 0.00087, 0.00087],
              [0.00099, 0, 0],
              [0.00226, 0.00087, 0.00087],
          ]
      )
  
      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 diffusion tensor diagonal aligned to the x-axis
  
      # Simulate the reference kurtosis tensor
      angles = [(90, 35), (90, 35), (90, -35), (90, -35)]
  
      signal, dt, kt_ref = multi_tensor_dki(
          gtab_2s, mevals, angles=angles, fractions=frac, snr=None
      )
  
      # Compare rotated with the reference
      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 11 for calling a global function with example usage: test_Wrotate_crossing_fibers() without return types