code: def test_video_classification(self):
      # 1 Load the data
      dataset = foz.load_zoo_dataset(
          "kinetics-700-2020",
          split="validation",
          max_samples=15,
          shuffle=True,
      ).clone()
      dataset.untag_samples("validation")
  
      # Replace spaces in class names with underscore
      labels = dataset.distinct("ground_truth.label")
      labels_map = {l: l.replace(" ", "_") for l in labels}
      dataset = dataset.map_labels("ground_truth", labels_map).clone()
  
      # Get list of labels in dataset
      labels = dataset.distinct("ground_truth.label")
  
      # Create splits from the dataset
      splits = {"train": 0.7, "pred": 0.3}
      four.random_split(dataset, splits)
  
      # Here we use views into one dataset,
      # but you can also use a different dataset for each split
      train_dataset = dataset.match_tags("train")
      predict_dataset = dataset.match_tags("pred")
  
      # 2 Create the Datamodule
      datamodule = VideoClassificationData.from_fiftyone(
          train_dataset=dataset,
          predict_dataset=predict_dataset,
          label_field="ground_truth",
          batch_size=1,
          clip_sampler="uniform",
          clip_duration=1,
          decode_audio=False,
      )
  
      # 3 Build the model
      model = VideoClassifier(
          backbone="x3d_xs",
          labels=datamodule.labels,
          pretrained=False,
      )
  
      # 4 Create the trainer
      trainer = Trainer(max_epochs=1, limit_train_batches=5)
  
      # 5 Finetune the model
      trainer.finetune(model, datamodule=datamodule, strategy="freeze")
  
      # 6 Save it!
      trainer.save_checkpoint("/tmp/video_classification.pt")
  
      # 7 Generate predictions
      predictions = trainer.predict(
          model,
          datamodule=datamodule,
          output=FiftyOneLabelsOutput(labels=datamodule.labels),
      )
      predictions = list(
          chain.from_iterable(predictions)
      )  # flatten batches
  
      # Map filepaths to predictions
      predictions = {
          p["filepath"]: p["predictions"] for p in predictions
      }
  
      # Add predictions to FiftyOne dataset
      predict_dataset.set_values(
          "flash_predictions",
          predictions,
          key_field="filepath",
      )
  
imports: import numpy
  import unittest
  from itertools import chain
  from flash.core.data.utils import download_data
  from flash.image.detection.output import FiftyOneDetectionLabelsOutput
  from flash.core.classification import FiftyOneLabelsOutput
  from flash.image.segmentation.output import FiftyOneSegmentationLabelsOutput
  from flash.image import ImageClassificationData, ImageClassifier, ImageEmbedder
  from flash.image import ObjectDetectionData, ObjectDetector
  from flash.image import SemanticSegmentation, SemanticSegmentationData
  from flash import Trainer
  from flash.video import VideoClassificationData, VideoClassifier
  import fiftyone
  import fiftyone.brain
  import fiftyone.utils.random
  import fiftyone.zoo
label_desc: Use image node_id 5 for calling the LightningFlashTests obj's underlying member method code with example usage: obj.test_video_classification() without return types