def METHOD_NAME(self, x):
    x = self.patch_embedding(x)
    if hasattr(self, "cls_token"):
        cls_token = self.cls_token.expand(x.shape[0], -1, -1)
        x = torch.cat((cls_token, x), dim=1)
    hidden_states_out = []
    for blk in self.blocks:
        x = blk(x)
        hidden_states_out.append(x)
    x = self.norm(x)
    if hasattr(self, "classification_head"):
        x = self.classification_head(x[:, 0])
    return x, hidden_states_out