code: def multimask_images(
      images: Iterable[SpatialImage],
      masks: Sequence[np.ndarray],
      image_type: Optional[type] = None,
  ) -> Iterable[Sequence[np.ndarray]]:
      """Mask images with multiple masks.
  
      Parameters
      ----------
      images:
          Images to mask.
      masks:
          Masks to apply.
      image_type:
          Type to cast images to.
  
      Yields
      ------
      Sequence[np.ndarray]
          For each mask, a masked image.
      """
      for image in images:
          yield [mask_image(image, mask, image_type) for mask in masks]
  
file_path: brainiak/brainiak/image.py
imports: import itertools
  from typing import Optional, Iterable, Sequence, Type, TypeVar
  import numpy
  from nibabel.spatialimages import SpatialImage
label_desc: Use image node_id 2 for calling a global function with example usage: multimask_images(images, masks, image_type) without return types