def show_transform(image_path: str, transform: Any, sample_num: int = 6):
    """
    Show the result which `torchvision.transforms` or any other callable function act on the image.
    Only the Image transforms is supported. Such as `ToTensor` or `Normalize` is invalid.
    Args:
        image_path (`str`):
            The original image path.
        transform (`Any`):
            torchvision.transforms` or any other callable function.
        sample_num (`int`):
            Sample number.

    """
    if not is_matplotlib_available():
        trainer_log.warning('Matplotlib is not available.')
    from towhee.utils.matplotlib_utils import matplotlib
    import matplotlib.pylab as plt  # pylint: disable=import-outside-toplevel
    plt.rcParams['savefig.bbox'] = 'tight'
    orig_img = Image.open(image_path)
    trans_img_list = [transform(orig_img) for _ in range(sample_num)]
    _plot_transform(orig_img, trans_img_list)
Show the result which `torchvision.transforms` or any other callable function act on the image.
Only the Image transforms is supported. Such as `ToTensor` or `Normalize` is invalid.
Args:
image_path (`str`):
The original image path.
transform (`Any`):
torchvision.transforms` or any other callable function.
sample_num (`int`):
Sample number.
towhee/trainer/utils/plot_utils.py