def to_image_labels(labels, warn_unsupported=True):
    """Converts the image label(s) to ``eta.core.image.ImageLabels`` format.

    Args:
        labels: a :class:`fiftyone.core.labels.Label` instance or a dict
            mapping names to :class:`fiftyone.core.labels.Label` instances
        warn_unsupported (True): whether to issue warnings if unsupported label
            values are encountered

    Returns:
        an ``eta.core.image.ImageLabels`` instance
    """
    image_labels = etai.ImageLabels()

    if labels is None:
        return image_labels

    if not isinstance(labels, dict):
        labels = {"labels": labels}

    _add_frame_labels(image_labels, labels, warn_unsupported=warn_unsupported)

    return image_labels
Converts the image label(s) to ``eta.core.image.ImageLabels`` format.

    Args:
        labels: a :class:`fiftyone.core.labels.Label` instance or a dict
            mapping names to :class:`fiftyone.core.labels.Label` instances
        warn_unsupported (True): whether to issue warnings if unsupported label
            values are encountered

    Returns:
        an ``eta.core.image.ImageLabels`` instance
    
fiftyone/utils/eta.py