def generate_grid_of_augmented_images(
    input_images: List[Image.Image],
    collate_function: Union[BaseCollateFunction, MultiViewCollateFunction],
) -> List[List[Image.Image]]:
    """Returns a grid of augmented images. Images in a column belong together.

    This function ignores the ToTensor and Normalize transforms for visualization purposes.

    Args:
        input_images:
            List of PIL images for which the augmentations should be plotted.
        collate_function:
            The collate function of the self-supervised learning algorithm.
            Must be of type BaseCollateFunction or MultiViewCollateFunction.

    Returns:
        A grid of augmented images. Images in a column belong together.

    """
    grid = []
    if isinstance(collate_function, BaseCollateFunction):
        for _ in range(2):
            grid.append(
                [
                    apply_transform_without_normalize(image, collate_function.transform)
                    for image in input_images
                ]
            )
    elif isinstance(collate_function, MultiViewCollateFunction):
        for transform in collate_function.transforms:
            grid.append(
                [
                    apply_transform_without_normalize(image, transform)
                    for image in input_images
                ]
            )
    else:
        raise ValueError(
            "Collate function must be one of "
            "(BaseCollateFunction, MultiViewCollateFunction) "
            f"but is {type(collate_function)}."
        )
    return grid
Returns a grid of augmented images. Images in a column belong together.

    This function ignores the ToTensor and Normalize transforms for visualization purposes.

    Args:
        input_images:
            List of PIL images for which the augmentations should be plotted.
        collate_function:
            The collate function of the self-supervised learning algorithm.
            Must be of type BaseCollateFunction or MultiViewCollateFunction.

    Returns:
        A grid of augmented images. Images in a column belong together.

    
lightly/utils/debug.py