code: def test_to_frame_eval_patches():
      dataset = foz.load_zoo_dataset("quickstart-video").clone()
      dataset.limit(1).save()
  
      for sample in dataset:
          for frame in sample.frames.values():
              predictions = frame["detections"].copy()
              for det in predictions.detections:
                  det.confidence = random.random()
                  det.bounding_box[0] += 0.03 * (random.random() - 0.5)
                  det.bounding_box[1] += 0.03 * (random.random() - 0.5)
  
              frame["predictions"] = predictions
  
          sample.save()
  
      dataset.evaluate_detections(
          "frames.predictions",
          gt_field="frames.detections",
          eval_key="eval",
      )
  
      try:
          patches = dataset.to_evaluation_patches("eval")
          assert False  # shouldn't get here
      except ValueError:
          pass
  
      frames = dataset.to_frames(sample_frames=True)
      patches = frames.to_evaluation_patches("eval")
  
      print(patches)
      print(patches.first())
      print(patches.count_values("type"))
  
file_path: fiftyone/tests/intensive/video_tests.py
imports: import random
  import unittest
  import fiftyone
  import fiftyone.zoo
  from fiftyone import ViewField
  import fiftyone.utils.video
label_desc: Use image node_id 5 for calling a global function with example usage: test_to_frame_eval_patches() without return types