def METHOD_NAME(self, index):
    """Return an example's size as a float or tuple. This value is used
    when filtering a dataset with ``--max-positions``.
    Note: we use *tgt_dataset* to approximate the length of the source
    sentence, since we do not know the actual length until after
    backtranslation.
    """
    tgt_size = self.tgt_dataset.METHOD_NAME(index)[0]
    return (tgt_size, tgt_size)