def size(
            self,
            index: int
    ):
        """
        Return an example's size as a float or tuple. This value is used when
        filtering a dataset with max-positions.
        """
        return self.sizes[index]

        Return an example's size as a float or tuple. This value is used when
        filtering a dataset with max-positions.
        
infoxlm/fairseq/fairseq/data/legacy/masked_lm_dataset.py