class_docstr: Mosaic augmentation.
  
  .. image:: https://raw.githubusercontent.com/kornia/data/main/random_mosaic.png
  
  Given a certain number of images, mosaic transform combines them into one output image.
  The output image is composed of the parts from each sub-image. To mess up each image individually,
  referring to :class:`kornia.augmentation.RandomJigsaw`.
  
  The mosaic transform steps are as follows:
  
       1. Concate selected images into a super-image.
       2. Crop out the outcome image according to the top-left corner and crop size.
  
  Args:
      output_size: the output tensor width and height after mosaicing.
      start_ratio_range: top-left (x, y) position for cropping the mosaic images.
      mosaic_grid: the number of images and image arrangement. e.g. (2, 2) means
          each output will mix 4 images in a 2x2 grid.
      min_bbox_size: minimum area of bounding boxes. Default to 0.
      data_keys: the input type sequential for applying augmentations.
          Accepts "input", "image", "mask", "bbox", "bbox_xyxy", "bbox_xywh", "keypoints".
      p: probability of applying the transformation for the whole batch.
      keepdim: whether to keep the output shape the same as input ``True`` or broadcast it
          to the batch form ``False``.
      padding_mode: Type of padding. Should be: constant, reflect, replicate.
      resample: the interpolation mode.
      align_corners: interpolation flag.
      cropping_mode: The used algorithm to crop. ``slice`` will use advanced slicing to extract the tensor based
          on the sampled indices. ``resample`` will use `warp_affine` using the affine transformation
          to extract and resize at once. Use `slice` for efficiency, or `resample` for proper
          differentiability.
  
  Examples:
      >>> mosaic = RandomMosaic((300, 300), data_keys=["input", "bbox_xyxy"])
      >>> boxes = torch.tensor([[
      ...     [70, 5, 150, 100],
      ...     [60, 180, 175, 220],
      ... ]]).repeat(8, 1, 1)
      >>> input = torch.randn(8, 3, 224, 224)
      >>> out = mosaic(input, boxes)
      >>> out[0].shape, out[1].shape
      (torch.Size([8, 3, 300, 300]), torch.Size([8, 8, 4]))
code: def apply_transform_mask(
      self,
      input: Tensor,
      params: Dict[str, Tensor],
      flags: Dict[str, Any],
  ) -> Tensor:
      raise NotImplementedError
  
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from kornia.augmentation import random_generator
  from kornia.augmentation._2d.mix.base import MixAugmentationBaseV2
  from kornia.constants import DataKey, Resample
  from kornia.core import Tensor, as_tensor, concatenate, pad, zeros
  from kornia.core.check import KORNIA_UNWRAP
  from kornia.geometry.boxes import Boxes
  from kornia.geometry.transform import crop_by_indices, crop_by_transform_mat, get_perspective_transform
  from kornia.utils import eye_like
label_desc: Use image node_id 2 for calling the RandomMosaic obj's underlying member method code with example usage: obj.apply_transform_mask(input, params, flags) without return types