    def collater(self, samples, pad_to_length=None):
        """
        Merge a list of samples to form a mini-batch.
        Args:
            samples (List[dict]): samples to collate
        Returns:
            dict: a mini-batch of data
        """
        return collate(
            samples,
            self.vocab.pad(),
            self.vocab.eos(),
            self.vocab,
            pad_to_length=pad_to_length,
        )
Merge a list of samples to form a mini-batch.
Args:
samples (List[dict]): samples to collate
Returns:
dict: a mini-batch of data
fairseq/data/span_mask_tokens_dataset.py