def set_label_values(
        self,
        field_name,
        values,
        dynamic=False,
        skip_none=False,
        validate=True,
        progress=False,
    ):
        """Sets the fields of the specified labels in the collection to the
        given values.

        .. note::

            This method is appropriate when you have the IDs of the labels you
            wish to modify. See :meth:`set_values` and :meth:`set_field` if
            your updates are not keyed by label ID.

        Examples::

            import fiftyone as fo
            import fiftyone.zoo as foz
            from fiftyone import ViewField as F

            dataset = foz.load_zoo_dataset("quickstart")

            #
            # Populate a new boolean attribute on all high confidence labels
            #

            view = dataset.filter_labels("predictions", F("confidence") > 0.99)

            label_ids = view.values("predictions.detections.id", unwind=True)
            values = {_id: True for _id in label_ids}

            dataset.set_label_values("predictions.detections.high_conf", values)

            print(dataset.count("predictions.detections"))
            print(len(label_ids))
            print(dataset.count_values("predictions.detections.high_conf"))

        Args:
            field_name: a field or ``embedded.field.name``
            values: a dict mapping label IDs to values
            skip_none (False): whether to treat None data in ``values`` as
                missing data that should not be set
            dynamic (False): whether to declare dynamic attributes of embedded
                document fields that are encountered
            validate (True): whether to validate that the values are compliant
                with the dataset schema before adding them
            progress (False): whether to render a progress bar (True/False),
                use the default value ``fiftyone.config.show_progress_bars``
                (None), or a progress callback function to invoke instead
        """
        field, _ = self._expand_schema_from_values(
            field_name, values.values(), dynamic=dynamic, flat=True
        )

        if field is None:
            field = self.get_field(field_name)

        if field is not None and field.read_only:
            raise ValueError("Cannot edit read-only field '%s'" % field_name)

        _field_name, is_frame_field, _, _, id_to_str = self._parse_field_name(
            field_name, omit_terminal_lists=True
        )

        if field is None and id_to_str:
            field = fof.ObjectIdField()

        label_field = _field_name.split(".", 1)[0]
        if is_frame_field:
            label_field = self._FRAMES_PREFIX + label_field

        root, is_list_field = self._get_label_field_root(label_field)
        label_id_path = root + ".id"
        _root, _ = self._handle_frame_field(root)

        id_map = {}

        # We only need `view` to contain labels we actually want to process, so
        # if the number of values is small enough that `select_labels()` may
        # optimize, we use it
        if len(values) <= 100000:
            view = self.select_labels(ids=list(values), fields=label_field)
        else:
            view = self

        if is_frame_field:
            frame_ids, label_ids = view.values(["frames._id", label_id_path])

            if is_list_field:
                for _fids, _flids in zip(frame_ids, label_ids):
                    for _frame_id, _label_ids in zip(_fids, _flids):
                        if _label_ids:
                            for _label_id in _label_ids:
                                id_map[_label_id] = _frame_id
            else:
                for _fids, _flids in zip(frame_ids, label_ids):
                    for _frame_id, _label_id in zip(_fids, _flids):
                        id_map[_label_id] = _frame_id
        else:
            sample_ids, label_ids = view.values(["_id", label_id_path])

            if is_list_field:
                for _sample_id, _label_ids in zip(sample_ids, label_ids):
                    if _label_ids:
                        for _label_id in _label_ids:
                            id_map[_label_id] = _sample_id
            else:
                for _sample_id, _label_id in zip(sample_ids, label_ids):
                    id_map[_label_id] = _sample_id

        if is_list_field:
            self._set_label_list_values(
                _field_name,
                values,
                id_map,
                _root,
                field=field,
                skip_none=skip_none,
                validate=validate,
                frames=is_frame_field,
                progress=progress,
            )
        else:
            _label_ids, _values = zip(*values.items())
            _ids = [id_map[label_id] for label_id in _label_ids]

            self._set_doc_values(
                _field_name,
                _ids,
                _values,
                field=field,
                skip_none=skip_none,
                validate=validate,
                frames=is_frame_field,
                progress=progress,
            )
Sets the fields of the specified labels in the collection to the
        given values.

        .. note::

            This method is appropriate when you have the IDs of the labels you
            wish to modify. See :meth:`set_values` and :meth:`set_field` if
            your updates are not keyed by label ID.

        Examples::

            import fiftyone as fo
            import fiftyone.zoo as foz
            from fiftyone import ViewField as F

            dataset = foz.load_zoo_dataset("quickstart")

            #
            # Populate a new boolean attribute on all high confidence labels
            #

            view = dataset.filter_labels("predictions", F("confidence") > 0.99)

            label_ids = view.values("predictions.detections.id", unwind=True)
            values = {_id: True for _id in label_ids}

            dataset.set_label_values("predictions.detections.high_conf", values)

            print(dataset.count("predictions.detections"))
            print(len(label_ids))
            print(dataset.count_values("predictions.detections.high_conf"))

        Args:
            field_name: a field or ``embedded.field.name``
            values: a dict mapping label IDs to values
            skip_none (False): whether to treat None data in ``values`` as
                missing data that should not be set
            dynamic (False): whether to declare dynamic attributes of embedded
                document fields that are encountered
            validate (True): whether to validate that the values are compliant
                with the dataset schema before adding them
            progress (False): whether to render a progress bar (True/False),
                use the default value ``fiftyone.config.show_progress_bars``
                (None), or a progress callback function to invoke instead
        
fiftyone/core/collections.py