docstr: Check the label distribution for each split.
docstr_tok: ["Check","the","label","distribution","for","each","split","."]
code: def _assertAsDataset(self, builder):
      """Check the label distribution for each split."""
      super(Ucf101Test, self)._assertAsDataset(builder)
      label_frequncies = {}
      label_feature = builder.info.features["label"]
      dataset = builder.as_dataset()
      for split_name in Ucf101Test.SPLITS:
          label_frequncies[split_name] = collections.defaultdict(int)
          for features in dataset_utils.as_numpy(dataset[split_name]):
              label_name = label_feature.int2str(features["label"])
              label_frequncies[split_name][label_name] += 1
      self.assertEqual(
          dict(label_frequncies),
          {
              "test": {"Archery": 1, "Nunchucks": 1},
              "train": {"Archery": 1, "Nunchucks": 2},
          },
      )
  
imports: import collections
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import dataset_utils
  from tensorflow_datasets.video import ucf101
label_desc: Use image node_id 1 for calling the Ucf101Test obj's underlying member method code with example usage: obj._assertAsDataset(builder) without return types