class_docstr: Tests for tao dataset.
code: def _download_and_prepare_as_dataset(self, builder):
      super()._download_and_prepare_as_dataset(builder)
  
      if (
          not tf.executing_eagerly()
      ):  # Only test the following in eager mode.
          return
  
      with self.subTest("check_annotations"):
          splits = builder.as_dataset()
          train_ex = list(splits[tfds.Split.TRAIN])[0]
          val_ex = list(splits[tfds.Split.VALIDATION])[0]
          for ex in [train_ex, val_ex]:
              # There should be the same number of each of these; a number
              # per group of bboxes indicating which frame they correspond to.
              self.assertEqual(
                  ex["tracks"]["bboxes"].shape[0],
                  ex["tracks"]["frames"].shape[0],
              )
  
      with self.subTest("check_video"):
          splits = builder.as_dataset()
          train_ex = list(splits[tfds.Split.TRAIN])[0]
          val_ex = list(splits[tfds.Split.VALIDATION])[0]
          # NOTE: For real images, this will be a list of potentially a thousand or
          # more frames. For testing purposes we load a single dummy 10 X 10 image.
          self.assertEqual(train_ex["video"].shape, (1, 28, 42, 3))
          self.assertEqual(val_ex["video"].shape, (1, 28, 42, 3))
  
imports: import tensorflow
  import tensorflow_datasets.public_api
  from tensorflow_datasets.video.tao import tao
label_desc: Use image node_id 2 for calling the TaoTest obj's underlying member method code with example usage: obj._download_and_prepare_as_dataset(builder) without return types