code: def load_images(
      image_paths: Iterable[Union[str, Path]]
  ) -> Iterable[SpatialImage]:
      """Load images from paths.
  
      For efficiency, returns an iterator, not a sequence, so the results cannot
      be accessed by indexing.
  
      For every new iteration through the images, load_images must be called
      again.
  
      Parameters
      ----------
      image_paths:
          Paths to images.
  
      Yields
      ------
      SpatialImage
          Image.
      """
      for image_path in image_paths:
          if isinstance(image_path, Path):
              string_path = str(image_path)
          else:
              string_path = image_path
          logger.debug("Starting to read file %s", string_path)
          yield nib.load(string_path)
  
file_path: brainiak/brainiak/io.py
imports: from pathlib import Path
  from typing import Optional, Callable, Iterable, List, Union
  import logging
  import nibabel
  import numpy
  from nibabel.nifti1 import Nifti1Pair
  from nibabel.spatialimages import SpatialImage
  from .image import SingleConditionSpec
label_desc: Use image node_id 2 for calling a global function with example usage: load_images(image_paths) without return types