code: def test_to_clips_expr(self):
      dataset = fo.Dataset()
  
      sample1 = fo.Sample(
          filepath="video1.mp4",
          metadata=fo.VideoMetadata(total_frame_count=4),
          hello="world",
      )
      sample1.frames[1] = fo.Frame(
          detections=fo.Detections(
              detections=[fo.Detection(label="cat")]
          )
      )
      sample1.frames[3] = fo.Frame(
          detections=fo.Detections(
              detections=[
                  fo.Detection(label="cat"),
                  fo.Detection(label="dog"),
              ]
          )
      )
      sample1.frames[4] = fo.Frame(
          detections=fo.Detections(
              detections=[fo.Detection(label="dog")]
          )
      )
  
      sample2 = fo.Sample(
          filepath="video2.mp4",
          metadata=fo.VideoMetadata(total_frame_count=5),
          hello="there",
      )
      sample2.frames[2] = fo.Frame(
          detections=fo.Detections(
              detections=[
                  fo.Detection(label="cat"),
                  fo.Detection(label="dog"),
              ]
          )
      )
      sample2.frames[3] = fo.Frame(
          detections=fo.Detections(
              detections=[
                  fo.Detection(label="cat"),
                  fo.Detection(label="dog"),
              ]
          )
      )
      sample2.frames[5] = fo.Frame(
          detections=fo.Detections(
              detections=[fo.Detection(label="dog")]
          )
      )
  
      dataset.add_samples([sample1, sample2])
  
      view = dataset.to_clips("frames.detections")
      self.assertListEqual(
          view.values("support"), [[1, 1], [3, 4], [2, 3], [5, 5]]
      )
  
      view = dataset.to_clips("frames.detections", tol=1)
      self.assertListEqual(view.values("support"), [[1, 4], [2, 5]])
  
      view = dataset.filter_labels(
          "frames.detections", F("label") == "cat"
      ).to_clips("frames.detections")
      self.assertListEqual(
          view.values("support"), [[1, 1], [3, 3], [2, 3]]
      )
  
      view = dataset.filter_labels(
          "frames.detections", F("label") == "cat"
      ).to_clips("frames.detections", tol=1, min_len=3)
      self.assertListEqual(view.values("support"), [[1, 3]])
  
      view = dataset.to_clips(
          F("detections.detections").length() >= 2, min_len=2
      )
      self.assertListEqual(view.values("support"), [[2, 3]])
      self.assertListEqual(
          view.distinct("dataset_id"),
          [str(view._dataset._doc.id)],
      )
  
      view = dataset.to_clips(
          "frames.detections", other_fields=["hello"]
      )
      view.select_fields().keep_fields()
  
      self.assertNotIn("detections", view.get_frame_field_schema())
      self.assertNotIn("detections", dataset.get_frame_field_schema())
  
      self.assertNotIn("hello", view.get_field_schema())
      self.assertIn("hello", dataset.get_field_schema())
  
      sample_view = view.first()
      with self.assertRaises(KeyError):
          sample_view["hello"]
  
      frame_view = sample_view.frames.first()
      with self.assertRaises(KeyError):
          frame_view["detections"]
  
      sample = dataset.first()
      frame = sample.frames.first()
      self.assertEqual(sample["hello"], "world")
      with self.assertRaises(KeyError):
          frame["detections"]
  
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 25 for calling the VideoTests obj's underlying member method code with example usage: obj.test_to_clips_expr() without return types