code: def load_images(image_paths: Iterable[Union[str, Path]]
                  ) -> Iterable[SpatialImage]:
      
      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)
docs: 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.