def get_exportable_transform(transform: Transform | None) -> Transform | None:
    """Get an exportable version of a transform.

    This function converts a torchvision transform into a format that is compatible with
    ONNX and OpenVINO export. It handles two main compatibility issues:

    1. Disables antialiasing in ``Resize`` transforms
    2. Converts ``CenterCrop`` to ``ExportableCenterCrop``

    Args:
        transform (Transform | None): The transform to convert. If ``None``, returns
            ``None``.

    Returns:
        Transform | None: The converted transform that is compatible with ONNX/OpenVINO
            export. Returns ``None`` if input transform is ``None``.

    Example:
        >>> from torchvision.transforms.v2 import Compose, Resize, CenterCrop
        >>> transform = Compose([
        ...     Resize((224, 224), antialias=True),
        ...     CenterCrop(200)
        ... ])
        >>> exportable = get_exportable_transform(transform)
        >>> # Now transform is compatible with ONNX/OpenVINO export

    Note:
        Some torchvision transforms are not directly supported by ONNX/OpenVINO. This
        function handles the most common cases, but additional transforms may need
        special handling.
    """
    if transform is None:
        return None
    transform = copy.deepcopy(transform)
    transform = disable_antialiasing(transform)
    return convert_center_crop_transform(transform)
Get an exportable version of a transform.

    This function converts a torchvision transform into a format that is compatible with
    ONNX and OpenVINO export. It handles two main compatibility issues:

    1. Disables antialiasing in ``Resize`` transforms
    2. Converts ``CenterCrop`` to ``ExportableCenterCrop``

    Args:
        transform (Transform | None): The transform to convert. If ``None``, returns
            ``None``.

    Returns:
        Transform | None: The converted transform that is compatible with ONNX/OpenVINO
            export. Returns ``None`` if input transform is ``None``.

    Example:
        >>> from torchvision.transforms.v2 import Compose, Resize, CenterCrop
        >>> transform = Compose([
        ...     Resize((224, 224), antialias=True),
        ...     CenterCrop(200)
        ... ])
        >>> exportable = get_exportable_transform(transform)
        >>> # Now transform is compatible with ONNX/OpenVINO export

    Note:
        Some torchvision transforms are not directly supported by ONNX/OpenVINO. This
        function handles the most common cases, but additional transforms may need
        special handling.
    
src/anomalib/pre_processing/utils/transform.py