    def size(self, index):
        """Return an example's size as a float or tuple. This value is used when
        filtering a dataset with ``--max-positions``."""
        return (
            self.frame_sizes[index],
            len(self.tgt[index]) if self.tgt is not None else 0,
        )
Return an example's size as a float or tuple. This value is used when
filtering a dataset with ``--max-positions``.
examples/speech_recognition/data/asr_dataset.py