class_docstr: Base class for video data modules.
docstr: Set up the datasets and perform dynamic subset splitting.
  
  This method may be overridden in subclass for custom splitting behaviour.
  
  Video datamodules are not compatible with synthetic anomaly generation.
docstr_tok: ["Set","up","the","datasets","and","perform","dynamic","subset","splitting",".","This","method","may","be","overridden","in","subclass","for","custom","splitting","behaviour",".","Video","datamodules","are","not","compatible","with","synthetic","anomaly","generation","."]
code: def _setup(self, _stage: str | None = None) -> None:
      """Set up the datasets and perform dynamic subset splitting.
  
      This method may be overridden in subclass for custom splitting behaviour.
  
      Video datamodules are not compatible with synthetic anomaly generation.
      """
      assert self.train_data is not None
      assert self.test_data is not None
  
      self.train_data.setup()
      self.test_data.setup()
  
      if self.val_split_mode == ValSplitMode.SYNTHETIC:
          raise ValueError(
              f"Val split mode {self.test_split_mode} not supported for video datasets."
          )
  
      self._create_val_split()
  
imports: from __future__ import annotations
  from abc import ABC
  from enum import Enum
  from typing import Callable
  import albumentations
  import torch
  from pandas import DataFrame
  from torch import Tensor
  from anomalib.data.base.datamodule import AnomalibDataModule
  from anomalib.data.base.dataset import AnomalibDataset
  from anomalib.data.task_type import TaskType
  from anomalib.data.utils import ValSplitMode, masks_to_boxes
  from anomalib.data.utils.video import ClipsIndexer
label_desc: Use image node_id 1 for calling the AnomalibVideoDataModule obj's underlying member method code with example usage: obj._setup(_stage) without return types