def forward_features(self, x: torch.Tensor) -> torch.Tensor:
            """
            This is a copy of the function in ArtViT.forward_features
            except we also perform an equivalence assertion compared to the implementation
            in https://github.com/MadryLab/smoothed-vit (see MadrylabImplementations class above)

            The forward pass of the ViT.

            :param x: Input data.
            :return: The input processed by the ViT backbone
            """
            import copy

            ablated_input = False
            if x.shape[1] == self.in_chans + 1:
                ablated_input = True

            if ablated_input:
                x, ablation_mask = x[:, : self.in_chans], x[:, self.in_chans : self.in_chans + 1]

            x = self.patch_embed(x)

            madry_embed = MadrylabImplementations.embedder(copy.copy(x), self.pos_embed, self.cls_token)
            x = self._pos_embed(x)
            assert torch.equal(madry_embed, x)

            # pass the x into the token dropping code
            madry_dropped = MadrylabImplementations.token_dropper(copy.copy(x), ablation_mask)

            if self.to_drop_tokens and ablated_input:
                ones = self.ablation_mask_embedder(ablation_mask)
                to_drop = torch.sum(ones, dim=2)
                indexes = torch.gt(torch.where(to_drop > 1, 1, 0), 0)
                x = self.drop_tokens(x, indexes)

            assert torch.equal(madry_dropped, x)

            x = self.norm_pre(x)
            x = self.blocks(x)

            return self.norm(x)

            This is a copy of the function in ArtViT.forward_features
            except we also perform an equivalence assertion compared to the implementation
            in https://github.com/MadryLab/smoothed-vit (see MadrylabImplementations class above)

            The forward pass of the ViT.

            :param x: Input data.
            :return: The input processed by the ViT backbone
            
tests/estimators/certification/test_vision_transformers.py