def create_vision_transformer(variant: str, pretrained: bool = False, **kwargs) -> "PyTorchVisionTransformer":
        """
        Creates a vision transformer using PyTorchViT which controls the forward pass of the model

        :param variant: The name of the vision transformer to load
        :param pretrained: If to load pre-trained weights
        :return: A ViT with the required methods needed for ART
        """

        from timm.models._builder import build_model_with_cfg
        from timm.models.vision_transformer import checkpoint_filter_fn
        from art.estimators.certification.derandomized_smoothing.vision_transformers.pytorch import (
            PyTorchVisionTransformer,
        )

        return build_model_with_cfg(
            PyTorchVisionTransformer,
            variant,
            pretrained,
            pretrained_filter_fn=checkpoint_filter_fn,
            **kwargs,
        )

        Creates a vision transformer using PyTorchViT which controls the forward pass of the model

        :param variant: The name of the vision transformer to load
        :param pretrained: If to load pre-trained weights
        :return: A ViT with the required methods needed for ART
        
art/estimators/certification/derandomized_smoothing/pytorch.py