def METHOD_NAME(self, src_tokens: List[torch.LongTensor]):
    # assert torch.is_tensor(src_tokens)
    dataset = self.task.build_dataset_for_inference(
        src_tokens,
        [x.numel() for x in src_tokens],
    )
    sample = dataset.collater(dataset)
    sample = utils.apply_to_sample(lambda tensor: tensor.to(self.device), sample)
    return sample