code: def test_detection_frames(self):
      dataset = fo.Dataset()
  
      sample1 = fo.Sample(
          filepath="video1.mp4",
          metadata=fo.VideoMetadata(total_frame_count=4),
      )
      sample1.frames[1] = fo.Frame(
          filepath="frame11.jpg", detection=fo.Detection(label="cat")
      )
      sample1.frames[2] = fo.Frame(filepath="frame12.jpg")
      sample1.frames[3] = fo.Frame(
          filepath="frame13.jpg", detection=fo.Detection(label="dog")
      )
  
      sample2 = fo.Sample(
          filepath="video2.mp4",
          metadata=fo.VideoMetadata(total_frame_count=5),
      )
      sample2.frames[1] = fo.Frame(
          filepath="frame21.jpg", detection=fo.Detection(label="dog")
      )
      sample2.frames[3] = fo.Frame(filepath="frame23.jpg")
      sample2.frames[5] = fo.Frame(
          filepath="frame25.jpg", detection=fo.Detection(label="rabbit")
      )
  
      dataset.add_samples([sample1, sample2])
  
      frames = dataset.to_frames()
      view = frames.filter_labels("detection", F("label") == "dog")
  
      view.tag_samples("test")
  
      self.assertEqual(view.count_sample_tags(), {"test": 2})
      self.assertEqual(dataset.count_sample_tags(), {})
  
      view.untag_samples("test")
  
      self.assertEqual(frames.count_sample_tags(), {})
      self.assertEqual(dataset.count_sample_tags(), {})
  
      view.tag_labels("test")
  
      self.assertEqual(view.count_label_tags(), {"test": 2})
      self.assertEqual(dataset.count_label_tags(), {"test": 2})
  
      view.untag_labels("test")
  
      self.assertEqual(view.count_label_tags(), {})
      self.assertEqual(dataset.count_label_tags(), {})
  
      view.tag_labels("test")
  
      self.assertEqual(view.count_label_tags(), {"test": 2})
      self.assertEqual(dataset.count_label_tags(), {"test": 2})
  
      view.select_labels(tags="test").untag_labels("test")
  
      self.assertEqual(view.count_label_tags(), {})
      self.assertEqual(dataset.count_label_tags(), {})
  
imports: from copy import deepcopy
  from datetime import date, datetime
  from bson import ObjectId
  import numpy
  import unittest
  import fiftyone
  import fiftyone.core.odm
  from fiftyone import ViewField
  from decorators import drop_datasets
label_desc: Use image node_id 33 for calling the VideoTests obj's underlying member method code with example usage: obj.test_detection_frames() without return types