code: def test_save_seeds():
      tissue = np.array(
          [
              [2, 1, 1, 2, 1],
              [2, 2, 1, 1, 2],
              [1, 1, 1, 1, 1],
              [1, 1, 1, 2, 2],
              [0, 1, 1, 1, 2],
              [0, 1, 1, 0, 2],
              [1, 0, 1, 1, 1],
          ]
      )
      tissue = tissue[None]
  
      sphere = HemiSphere.from_sphere(unit_octahedron)
      pmf_lookup = np.array(
          [
              [
                  0.0,
                  0.0,
                  0.0,
              ],
              [0.0, 0.0, 1.0],
          ]
      )
      pmf = pmf_lookup[(tissue > 0).astype("int")]
  
      # Create a seeds along
      x = np.array([0.0, 0, 0, 0, 0, 0, 0])
      y = np.array([0.0, 1, 2, 3, 4, 5, 6])
      z = np.array([1.0, 1, 1, 0, 1, 1, 1])
      seeds = np.column_stack([x, y, z])
  
      # Set up tracking
      endpoint_mask = tissue == StreamlineStatus.ENDPOINT
      invalidpoint_mask = tissue == StreamlineStatus.INVALIDPOINT
      sc = ActStoppingCriterion(endpoint_mask, invalidpoint_mask)
      dg = ProbabilisticDirectionGetter.from_pmf(pmf, 60, sphere)
  
      # valid streamlines only
      streamlines_generator = LocalTracking(
          direction_getter=dg,
          stopping_criterion=sc,
          seeds=seeds,
          affine=np.eye(4),
          step_size=1.0,
          return_all=False,
          save_seeds=True,
      )
  
      streamlines_not_all = iter(streamlines_generator)
      # Verify that seeds are returned by the LocalTracker
      _, seed = next(streamlines_not_all)
      npt.assert_equal(seed, seeds[0])
      _, seed = next(streamlines_not_all)
      npt.assert_equal(seed, seeds[1])
      # Verify that seeds are returned by the PFTTracker also
      pft_streamlines = ParticleFilteringTracking(
          direction_getter=dg,
          stopping_criterion=sc,
          seeds=seeds,
          affine=np.eye(4),
          step_size=1.0,
          max_cross=1,
          return_all=False,
          save_seeds=True,
      )
      streamlines = iter(pft_streamlines)
      _, seed = next(streamlines)
      npt.assert_equal(seed, seeds[0])
      _, seed = next(streamlines)
      npt.assert_equal(seed, seeds[1])
  
imports: from logging import warn
  import warnings
  import nibabel
  import numpy
  import numpy.testing
  from dipy.core.gradients import gradient_table
  from dipy.core.sphere import HemiSphere, unit_octahedron
  from dipy.data import get_fnames, get_sphere
  from dipy.direction import BootDirectionGetter, ClosestPeakDirectionGetter, DeterministicMaximumDirectionGetter, PeaksAndMetrics, ProbabilisticDirectionGetter, PTTDirectionGetter
  from dipy.reconst.csdeconv import ConstrainedSphericalDeconvModel
  from dipy.reconst.shm import descoteaux07_legacy_msg
  from dipy.tracking.local_tracking import LocalTracking, ParticleFilteringTracking
  from dipy.tracking.streamline import Streamlines
  from dipy.tracking.stopping_criterion import ActStoppingCriterion, BinaryStoppingCriterion, ThresholdStoppingCriterion, StreamlineStatus
  from dipy.tracking.utils import random_seeds_from_mask, seeds_from_mask
  from dipy.sims.voxel import single_tensor, multi_tensor
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 3 for calling a global function with example usage: test_save_seeds() without return types