def to_video_labels(
    label=None, frames=None, support=None, warn_unsupported=True
):
    """Converts the given labels to ``eta.core.video.VideoLabels`` format.

    Args:
        label (None): video-level labels provided as a
            :class:`fiftyone.core.labels.Label` instance or dict mapping field
            names to :class:`fiftyone.core.labels.Label` instances
        frames (None): frame-level labels provided as a dict mapping frame
            numbers to dicts mapping field names to
            :class:`fiftyone.core.labels.Label` instances
        support (None): an optional ``[first, last]`` support to store on the
            returned labels
        warn_unsupported (True): whether to issue warnings if unsupported label
            values are encountered

    Returns:
        a ``eta.core.video.VideoLabels``
    """
    if support is not None:
        support = etafu.FrameRanges.build_simple(*support)

    video_labels = etav.VideoLabels(support=support)

    # Video labels
    if label is not None:
        if not isinstance(label, dict):
            label = {"labels": label}

        _add_video_labels(
            video_labels, label, warn_unsupported=warn_unsupported
        )

    # Frame labels
    if frames is not None:
        for frame_number, frame in frames.items():
            frame_labels = etav.VideoFrameLabels(frame_number)

            _add_frame_labels(
                frame_labels, frame, warn_unsupported=warn_unsupported
            )

            video_labels[frame_number] = frame_labels

    return video_labels
Converts the given labels to ``eta.core.video.VideoLabels`` format.

    Args:
        label (None): video-level labels provided as a
            :class:`fiftyone.core.labels.Label` instance or dict mapping field
            names to :class:`fiftyone.core.labels.Label` instances
        frames (None): frame-level labels provided as a dict mapping frame
            numbers to dicts mapping field names to
            :class:`fiftyone.core.labels.Label` instances
        support (None): an optional ``[first, last]`` support to store on the
            returned labels
        warn_unsupported (True): whether to issue warnings if unsupported label
            values are encountered

    Returns:
        a ``eta.core.video.VideoLabels``
    
fiftyone/utils/eta.py