def multiple_pretrain_samples_collate(batch, fold=False):
    """
    Collate function for repeated augmentation. Each instance in the batch has
    more than one sample.
    Args:
        batch (tuple or list): data batch to collate.
    Returns:
        (tuple): collated data batch.
    """
    process_data, mask = zip(*batch)
    process_data = [item for sublist in process_data for item in sublist]
    mask = [item for sublist in mask for item in sublist]
    process_data, mask = (
        default_collate(process_data),
        default_collate(mask),
    )
    if fold:
        return [process_data], mask
    else:
        return process_data, mask
Collate function for repeated augmentation. Each instance in the batch has
more than one sample.
Args:
batch (tuple or list): data batch to collate.
Returns:
(tuple): collated data batch.
videomamba/video_sm/utils.py