code: def test_streamline_gradients():
      streamline = [[1, 2, 3], [4, 5, 6], [5, 6, 7], [8, 9, 10]]
      grads = np.array([[3, 3, 3], [2, 2, 2], [2, 2, 2], [3, 3, 3]])
      npt.assert_array_equal(
          life.streamline_gradients(streamline), grads
      )
  
file_path: dipy/dipy/tracking/tests/test_life.py
imports: import os.path
  import dipy.core.gradients
  import dipy.core.optimize
  import dipy.data
  from dipy.io.image import load_nifti_data
  from dipy.io.gradients import read_bvals_bvecs
  from dipy.io.stateful_tractogram import Space, StatefulTractogram
  import dipy.tracking.life
  import nibabel
  import numpy
  import numpy.testing
  import scipy.linalg
label_desc: Use image node_id 1 for calling a global function with example usage: test_streamline_gradients() without return types