code: def test_reduce_rois():
      roi1 = np.zeros((4, 4, 4), dtype=bool)
      roi2 = np.zeros((4, 4, 4), dtype=bool)
      roi1[1, 1, 1] = 1
      roi2[2, 2, 2] = 1
      include_roi, exclude_roi = reduce_rois([roi1, roi2], [True, True])
      npt.assert_equal(include_roi, roi1 + roi2)
      npt.assert_equal(exclude_roi, np.zeros((4, 4, 4)))
      include_roi, exclude_roi = reduce_rois(
          [roi1, roi2], [True, False]
      )
      npt.assert_equal(include_roi, roi1)
      npt.assert_equal(exclude_roi, roi2)
      # Array input:
      include_roi, exclude_roi = reduce_rois(
          np.array([roi1, roi2]), [True, True]
      )
      npt.assert_equal(include_roi, roi1 + roi2)
      npt.assert_equal(exclude_roi, np.zeros((4, 4, 4)))
      # Int and float input
      roi1 = np.zeros((4, 4, 4), dtype=int)
      roi2 = np.zeros((4, 4, 4), dtype=float)
      npt.assert_warns(UserWarning, reduce_rois, [roi1], [True])
      npt.assert_warns(UserWarning, reduce_rois, [roi2], [True])
  
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 18 for calling a global function with example usage: test_reduce_rois() without return types