code: def test_FiberModel_init():
      # Get some small amount of data:
      data_file, bval_file, bvec_file = dpd.get_fnames("small_64D")
      bvals, bvecs = read_bvals_bvecs(bval_file, bvec_file)
      gtab = grad.gradient_table(bvals, bvecs)
      FM = life.FiberModel(gtab)
      streamline_cases = [
          [
              [[1, 2, 3], [4, 5, 3], [5, 6, 3], [6, 7, 3]],
              [[1, 2, 3], [4, 5, 3], [5, 6, 3]],
          ],
          [[[1, 2, 3]], [[1, 2, 3], [4, 5, 3], [5, 6, 3]]],
      ]
  
      affine = np.eye(4)
  
      for sphere in [None, False, dpd.get_sphere("symmetric362")]:
          fiber_matrix, vox_coords = FM.setup(
              streamline_cases[0], affine, sphere=sphere
          )
          npt.assert_array_equal(
              np.array(vox_coords),
              np.array([[1, 2, 3], [4, 5, 3], [5, 6, 3], [6, 7, 3]]),
          )
  
          npt.assert_equal(
              fiber_matrix.shape,
              (len(vox_coords) * 64, len(streamline_cases[0])),
          )
          npt.assert_raises(
              IndexError,
              FM.setup,
              streamline_cases[1],
              affine,
              sphere=sphere,
          )
  
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 5 for calling a global function with example usage: test_FiberModel_init() without return types