code: def test_batching(self):
      dataset = fo.Dataset()
      for i in range(5):
          sample = fo.Sample(
              filepath="video%d.mp4" % i,
              cls=fo.Classification(label=i * str(i)),
              det=fo.Detections(
                  detections=[
                      fo.Detection(label=ii * str(ii))
                      for ii in range(i)
                  ]
              ),
          )
          for j in range(1, 5):
              sample.frames[j] = fo.Frame(
                  cls=fo.Classification(label=(i + j) * str(i + j)),
                  det=fo.Detections(
                      detections=[
                          fo.Detection(label=ij * str(ij))
                          for ij in range(i + j)
                      ]
                  ),
              )
  
          dataset.add_sample(sample)
  
      stages = [
          fo.Count(),
          fo.Count("frames"),
          fo.Distinct("cls.label"),
          fo.Distinct("frames.cls.label"),
          fo.Values("id"),
          fo.Values("cls.label"),
          fo.Values("cls.label", expr=F().strlen()),
          fo.Values(F("cls.label").strlen()),
          fo.Values("det.detections.label"),
          fo.Values("det.detections[].label"),
          fo.Values("det.detections.label", unwind=True),
          fo.Values("frames.id"),
          fo.Values("frames.cls.label"),
          fo.Values("frames.cls.label", expr=F().strlen()),
          fo.Values(F("frames.cls.label").strlen()),
          fo.Values("frames.det.detections.label"),
          fo.Values("frames[].det.detections[].label"),
          fo.Values("frames.det.detections.label", unwind=True),
      ]
  
      results = dataset.aggregate(stages)
      self.assertEqual(len(stages), len(results))
  
      fields = [
          "id",
          "cls.label",
          "det.detections.label",
          "det.detections[].label",
          "frames.id",
          "frames.cls.label",
          "frames.det.detections.label",
          "frames[].det.detections[].label",
      ]
  
      results = dataset.values(fields)
      self.assertEqual(len(fields), len(results))
  
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 17 for calling the DatasetTests obj's underlying member method code with example usage: obj.test_batching() without return types