code: def test_DKI_simulations_aligned_fibers():
      """
      Testing DKI simulations when aligning the same fiber to different axis.
  
      If biological parameters don't change, kt[0] of a fiber aligned to axis x
      has to be equal to kt[1] of a fiber aligned to the axis y and equal to
      kt[2] of a fiber aligned to axis z. The same is applicable for dt
      """
      # Defining parameters based on Neto Henriques et al., 2015. NeuroImage 111
      mevals = np.array(
          [
              [0.00099, 0, 0],  # Intra-cellular
              [0.00226, 0.00087, 0.00087],
          ]
      )  # Extra-cellular
      frac = [49, 51]  # Compartment volume fraction
      # axis x
      angles = [(90, 0), (90, 0)]
      signal_fx, dt_fx, kt_fx = multi_tensor_dki(
          gtab_2s, mevals, angles=angles, fractions=frac
      )
      # axis y
      angles = [(90, 90), (90, 90)]
      signal_fy, dt_fy, kt_fy = multi_tensor_dki(
          gtab_2s, mevals, angles=angles, fractions=frac
      )
      # axis z
      angles = [(0, 0), (0, 0)]
      signal_fz, dt_fz, kt_fz = multi_tensor_dki(
          gtab_2s, mevals, angles=angles, fractions=frac
      )
  
      assert_array_equal(
          [kt_fx[0], kt_fx[1], kt_fx[2]], [kt_fy[1], kt_fy[0], kt_fy[2]]
      )
      assert_array_equal(
          [kt_fx[0], kt_fx[1], kt_fx[2]], [kt_fz[2], kt_fz[0], kt_fz[1]]
      )
  
      assert_array_equal(
          [dt_fx[0], dt_fx[2], dt_fx[5]], [dt_fy[2], dt_fy[0], dt_fy[5]]
      )
      assert_array_equal(
          [dt_fx[0], dt_fx[2], dt_fx[5]], [dt_fz[5], dt_fz[0], dt_fz[2]]
      )
  
      # testing S signal along axis x, y and z
      bvals = np.array([0, 0, 0, 1000, 1000, 1000, 2000, 2000, 2000])
      bvecs = np.asarray(
          [
              [1, 0, 0],
              [0, 1, 0],
              [0, 0, 1],
              [1, 0, 0],
              [0, 1, 0],
              [0, 0, 1],
              [1, 0, 0],
              [0, 1, 0],
              [0, 0, 1],
          ]
      )
      gtab_axis = gradient_table(bvals, bvecs)
      # axis x
      S_fx = dki_signal(gtab_axis, dt_fx, kt_fx, S0=100)
      assert_array_almost_equal(
          S_fx[0:3], [100, 100, 100]
      )  # test S f0r b=0
      # axis y
      S_fy = dki_signal(gtab_axis, dt_fy, kt_fy, S0=100)
      assert_array_almost_equal(
          S_fy[0:3], [100, 100, 100]
      )  # test S f0r b=0
      # axis z
      S_fz = dki_signal(gtab_axis, dt_fz, kt_fz, S0=100)
      assert_array_almost_equal(
          S_fz[0:3], [100, 100, 100]
      )  # test S f0r b=0
  
      # test S for b = 1000
      assert_array_almost_equal(
          [S_fx[3], S_fx[4], S_fx[5]], [S_fy[4], S_fy[3], S_fy[5]]
      )
      assert_array_almost_equal(
          [S_fx[3], S_fx[4], S_fx[5]], [S_fz[5], S_fz[3], S_fz[4]]
      )
      # test S for b = 2000
      assert_array_almost_equal(
          [S_fx[6], S_fx[7], S_fx[8]], [S_fy[7], S_fy[6], S_fy[8]]
      )
      assert_array_almost_equal(
          [S_fx[6], S_fx[7], S_fx[8]], [S_fz[8], S_fz[6], S_fz[7]]
      )
  
file_path: dipy/dipy/sims/tests/test_voxel.py
imports: import numpy
  from numpy.testing import assert_array_equal, assert_array_almost_equal, assert_, assert_almost_equal
  from dipy.sims.voxel import _check_directions, all_tensor_evecs, add_noise, single_tensor, sticks_and_ball, multi_tensor_dki, kurtosis_element, dki_signal, multi_tensor
  from dipy.data import get_fnames
  from dipy.core.gradients import gradient_table
  from dipy.io.gradients import read_bvals_bvecs
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 9 for calling a global function with example usage: test_DKI_simulations_aligned_fibers() without return types