keras/src/legacy/preprocessing/image.py/DataFrameIterator/labels
class DataFrameIterator:    def labels(self):
        if self.class_mode in {"multi_output", "raw"}:
            return self._targets
        else:
            return self.classes