code: def change_sample_tags(sample_collection, changes):
      """Applies the changes to tags to all samples of the collection, if
      necessary.
  
      Args:
          sample_collection: a
              :class:`fiftyone.core.collections.SampleCollection`
          changes: a dict of tags as keys and bools as values. A ``True`` value
              adds the tag to all samples, if necessary. A ``False`` value
              removes the tag from all samples, if necessary
      """
      add_tags, del_tags = _parse_changes(changes)
  
      if add_tags:
          sample_collection.tag_samples(add_tags)
  
      if del_tags:
          sample_collection.untag_samples(del_tags)
  
file_path: fiftyone/fiftyone/server/utils.py
imports: import typing
  import cachetools
  from dacite import Config, from_dict
  from dacite.core import T
  from dacite.data import Data
  import fiftyone.core.collections
  import fiftyone.core.dataset
  import fiftyone.core.fields
  import fiftyone.core.labels
  import fiftyone.core.media
label_desc: Use image node_id 2 for calling a global function with example usage: change_sample_tags(sample_collection, changes) without return types