class_docstr: We add the cut-and-paste parameters to the mini-batch within the collate function,
  (we pass it as the `batch_aug_fn` parameter to the `SegCollate` constructor)
  as the collate function pads all samples to a common size
code: def __call__(self, batch):
      sample = batch[0]
      mask_size = sample["img"].shape[1:3]
      params = self.mask_gen.generate_params(
          n_masks=len(batch), mask_shape=mask_size
      )
      for sample, p in zip(batch, params):
          sample["mask_params"] = p.astype(np.float32)
      return batch
  
file_path: PaddleSeg/contrib/CrossPseudoSupervision/batch_transforms/mask_gen.py
imports: import numpy
  from cvlibs import manager
label_desc: Use image node_id 2 for calling the AddMaskParamsToBatch obj's underlying member method code with example usage: obj.__call__(batch) and returns: batch