code: def test_reduce_labels():
      shape = (4, 5, 6)
      # labels from 100 to 220
      labels = np.arange(100, np.prod(shape) + 100).reshape(shape)
      # new labels form 0 to 120, and lookup maps range(0,120) to range(100, 220)
      new_labels, lookup = reduce_labels(labels)
      npt.assert_array_equal(new_labels, labels - 100)
      npt.assert_array_equal(lookup, labels.ravel())
  
imports: import warnings
  import numpy
  import pytest
  from dipy.tracking import metrics
  from dipy.tracking.streamline import transform_streamlines
  from dipy.tracking.utils import connectivity_matrix, density_map, length, ndbincount, reduce_labels, seeds_from_mask, random_seeds_from_mask, target, target_line_based, unique_rows, near_roi, reduce_rois, path_length, _min_at, max_angle_from_curvature, min_radius_curvature_from_angle
  from dipy.tracking._utils import _to_voxel_coordinates
  from dipy.tracking.vox2track import streamline_mapping
  import numpy.testing
  from dipy.testing import assert_true
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 6 for calling a global function with example usage: test_reduce_labels() without return types