code: def test_needs_frames(self):
      sample1 = fo.Sample(filepath="video1.mp4", int=1)
      sample1.frames[1] = fo.Frame(
          detections=fo.Detections(
              detections=[
                  fo.Detection(label="cat"),
                  fo.Detection(label="dog"),
              ]
          )
      )
      sample1.frames[2] = fo.Frame()
      sample1.frames[3] = fo.Frame(
          detections=fo.Detections(
              detections=[
                  fo.Detection(label="rabbit"),
                  fo.Detection(label="squirrel"),
                  fo.Detection(label="fox"),
              ]
          )
      )
  
      sample2 = fo.Sample(filepath="video2.mp4", int=2)
      sample2.frames[1] = fo.Frame(
          detections=fo.Detections(
              detections=[
                  fo.Detection(label="cat"),
                  fo.Detection(label="dog"),
              ]
          )
      )
      sample2.frames[2] = fo.Frame()
  
      dataset = fo.Dataset()
      dataset.add_samples([sample1, sample2])
  
      expr1 = F("int") > 1.5
      expr2 = F("frames").length() > 2
  
      values = dataset.values(expr1)
      self.assertListEqual(values, [False, True])
  
      values = dataset.values(expr2)
      self.assertListEqual(values, [True, False])
  
      values = dataset.values(expr1 | expr2)
      self.assertListEqual(values, [True, True])
  
      values = dataset.values(expr1 & expr2)
      self.assertListEqual(values, [False, False])
  
imports: from datetime import date, datetime, timedelta
  import math
  from bson import ObjectId
  import numpy
  import unittest
  import fiftyone
  import fiftyone.core.fields
  from fiftyone import ViewField
  from decorators import drop_datasets
label_desc: Use image node_id 19 for calling the DatasetTests obj's underlying member method code with example usage: obj.test_needs_frames() without return types