code: def test_single_tensor():
      evals = np.array([1.4, 0.35, 0.35]) * 10 ** (-3)
      evecs = np.eye(3)
      S = single_tensor(gtab, 100, evals, evecs, snr=None)
      assert_array_almost_equal(S[gtab.b0s_mask], 100)
      assert_(np.mean(S[~gtab.b0s_mask]) < 100)
  
      from dipy.reconst.dti import TensorModel
  
      m = TensorModel(gtab)
      t = m.fit(S)
  
      assert_array_almost_equal(t.fa, 0.707, decimal=3)
  
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 4 for calling a global function with example usage: test_single_tensor() without return types