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``."""
    if len(self.sizes) == 1:
        return self.sizes[0][index]
    else:
        return (s[index] for s in self.sizes)