def embedder(cls, x, pos_embed, cls_token):
                """
                NB, original code used the pos embed from the divit rather than vit
                (which we pull from our model) which we use here.

                From timm vit:
                self.pos_embed = nn.Parameter(torch.randn(1, embed_len, embed_dim) * .02)

                From timm dvit:
                self.pos_embed = nn.Parameter(torch.zeros(1,
                                                         self.patch_embed.num_patches + self.num_prefix_tokens,
                                                         self.embed_dim))

                From repo:
                self.pos_embed = nn.Parameter(torch.zeros(1, num_patches + 1, embed_dim))
                """
                x = torch.cat((cls_token.expand(x.shape[0], -1, -1), x), dim=1)
                return x + pos_embed

                NB, original code used the pos embed from the divit rather than vit
                (which we pull from our model) which we use here.

                From timm vit:
                self.pos_embed = nn.Parameter(torch.randn(1, embed_len, embed_dim) * .02)

                From timm dvit:
                self.pos_embed = nn.Parameter(torch.zeros(1,
                                                         self.patch_embed.num_patches + self.num_prefix_tokens,
                                                         self.embed_dim))

                From repo:
                self.pos_embed = nn.Parameter(torch.zeros(1, num_patches + 1, embed_dim))
                
tests/estimators/certification/test_vision_transformers.py