def METHOD_NAME(self):
    for tokenizer in [BartTokenizer.from_pretrained("bart-large", max_len=1024)]:
        batch = tokenizer(
            text=["I am a small frog" * 1024, "I am a small frog"],
            padding=True,
            truncation=True,
            return_tensors="pd",
        )
        self.assertEqual(batch.input_ids.shape, [2, 1024])