def _get_classes(data):
    """
    Function retrieve classes for each image or return None if no classes.
    """
    return list(map(data.domain.class_var.repr_val, data.Y)
        ) if data.domain.class_var else None
