          logger.debug("masked shapes: %s", [faces.shape for faces in retval])
          return retval
  
      @classmethod
      def _overlay_foreground(cls, backgrounds, foregrounds):
          """ Overlay the preview images into the center of the background images
  
          Parameters
          ----------
          backgrounds: list
 
</s> remove         backgrounds: list
            List of :class:`numpy.ndarray` background images for placing the preview images onto
        backgrounds: list
            List of :class:`numpy.ndarray` preview images for placing onto the background images
 </s> add         backgrounds: :class:`numpy.ndarray`
            Background images for placing the preview images onto
        backgrounds: :class:`numpy.ndarray`
            Preview images for placing onto the background images </s> remove         Penalized loss expects the target mask to be included for all outputs in the 4th channel
        of the targets. Any additional masks are placed into subsequent channels for extraction
        by the relevant loss functions.
 </s> add     def generate_preview(self,
                         is_timelapse: bool = False) -> Dict[Literal["a", "b"], List[np.ndarray]]:
        """ Generate the images for preview window or timelapse </s> remove     def _compile_masked(cls, faces, masks):
 </s> add     def _compile_masked(cls, faces: List[np.ndarray], masks: np.ndarray) -> List[np.ndarray]: </s> remove         saver: lib.images.ImagesSaver
            The background saver for saving the image
 </s> add         saver: :class:`lib.images.ImagesSaver` or ``None``
            The background saver for saving the image or ``None`` if faces are not to be saved </s> remove     def get_batch(self):
 </s> add     def get_batch(self) -> Tuple[List[List[np.ndarray]], ...]:
    def _overlay_foreground(cls, backgrounds: np.ndarray, foregrounds: np.ndarray) -> np.ndarray:
          logger.debug("masked shapes: %s", [faces.shape for faces in retval])
          return retval
  
      @classmethod
    def _overlay_foreground(cls, backgrounds: np.ndarray, foregrounds: np.ndarray) -> np.ndarray:
          """ Overlay the preview images into the center of the background images
  
          Parameters
          ----------
          backgrounds: list
keep keep keep keep replace keep keep keep keep keep
 Data Augmentation update (#1263)

- lib.detected_face
    - Subclass Masks for Landmark based masks
    - Add training mask propery + methods to DetectedFace
  - lib.training_training
    - subclass TrainingDataGenerator for training and preview data
    - Split cache into own module
    - Reduce thread count to 1 to prevent image corruption + data re-use
    - Process on largest model input/output size rather than stored image size
    - Size and crop masks during caching stage
    - Implement ring buffer for data flow
    - Fix preview reload bug
  - augmentation
    - typing
    - switch color aug order
    - better initialization
    - Fix warp + landmark warp to correctly apply at different image scales
    - Slightly improved warp caching
    - Don't store whether image is_preview. Handle all data as training images implicitly
  - plugins.trainer: Typing and fixes to work with trainingdata refactor 
plugins/train/trainer/_base.py