code: def test_set_values_frames():
      dataset = foz.load_zoo_dataset("quickstart-video").clone()
  
      with fo.ProgressBar() as pb:
          for sample in pb(dataset):
              for frame in sample.frames.values():
                  frame["animal"] = fo.Classification(
                      label=random.choice(_ANIMALS)
                  )
  
              sample.save()
  
      # Test simple fields
  
      path = "frames.animal.label"
      path_upper = path + "_upper"
      path_check = path + "_check"
  
      values = dataset.values(path)
      print(dataset.count_values(path))
  
      values_upper = _to_upper(values)
  
      dataset.set_values(path_upper, values_upper)
      print(dataset.count_values(path_upper))
  
      view = dataset.set_field(
          path_check, F("label").upper() == F("label_upper")
      )
      print(view.count_values(path_check))
  
      # Test array fields
  
      path = "frames.detections.detections.label"
      path_upper = path + "_upper"
      path_check = path + "_check"
  
      values = dataset.values(path)
      print(dataset.count_values(path))
  
      values_upper = _to_upper(values)
  
      dataset.set_values(path_upper, values_upper)
      print(dataset.count_values(path_upper))
  
      view = dataset.set_field(
          path_check, F("label").upper() == F("label_upper")
      )
      print(view.count_values(path_check))
  
file_path: fiftyone/tests/intensive/collections_tests.py
imports: import random
  import unittest
  import fiftyone
  import fiftyone.zoo
  from fiftyone import ViewField
label_desc: Use image node_id 2 for calling a global function with example usage: test_set_values_frames() without return types