def timm_vit_available() -> bool:
    """Checks if Vision Transformer (ViT) models are available in the timm library.

    This function checks if the `vision_transformer` module and `LayerType` from timm
    are available, which requires timm version >= 0.3.3 and >= 0.9.9, respectively.

    Returns:
        True if the Vision Transformer (ViT) models are available in timm,
        otherwise False.

    """
    try:
        import timm.models.vision_transformer  # Requires timm >= 0.3.3
        from timm.layers import LayerType  # Requires timm >= 0.9.9
    except ImportError:
        return False
    return True
Checks if Vision Transformer (ViT) models are available in the timm library.

    This function checks if the `vision_transformer` module and `LayerType` from timm
    are available, which requires timm version >= 0.3.3 and >= 0.9.9, respectively.

    Returns:
        True if the Vision Transformer (ViT) models are available in timm,
        otherwise False.

    
lightly/utils/dependency.py