class_docstr: Base Anomalib data module.
  
  Args:
      train_batch_size (int): Batch size used by the train dataloader.
      test_batch_size (int): Batch size used by the val and test dataloaders.
      num_workers (int): Number of workers used by the train, val and test dataloaders.
      test_split_mode (Optional[TestSplitMode], optional): Determines how the test split is obtained.
          Options: [none, from_dir, synthetic]
      test_split_ratio (float): Fraction of the train images held out for testing.
      val_split_mode (ValSplitMode): Determines how the validation split is obtained. Options: [none, same_as_test,
          from_test, synthetic]
      val_split_ratio (float): Fraction of the train or test images held our for validation.
      seed (int | None, optional): Seed used during random subset splitting.
class_docstr_tok: ["Base","Anomalib","data","module",".","Args",":","train_batch_size","(","int",")",":","Batch","size","used","by","the","train","dataloader",".","test_batch_size","(","int",")",":","Batch","size","used","by","the","val","and","test","dataloaders",".","num_workers","(","int",")",":","Number","of","workers","used","by","the","train",",","val","and","test","dataloaders",".","test_split_mode","(","Optional","[","TestSplitMode","]",",","optional",")",":","Determines","how","the","test","split","is","obtained",".","Options",":","[","none",",","from_dir",",","synthetic","]","test_split_ratio","(","float",")",":","Fraction","of","the","train","images","held","out","for","testing",".","val_split_mode","(","ValSplitMode",")",":","Determines","how","the","validation","split","is","obtained",".","Options",":","[","none",",","same_as_test",",","from_test",",","synthetic","]","val_split_ratio","(","float",")",":","Fraction","of","the","train","or","test","images","held","our","for","validation",".","seed","(","int","|","None",",","optional",")",":","Seed","used","during","random","subset","splitting","."]
code: def __init__(
      self,
      train_batch_size: int,
      eval_batch_size: int,
      num_workers: int,
      val_split_mode: ValSplitMode,
      val_split_ratio: float,
      test_split_mode: TestSplitMode | None = None,
      test_split_ratio: float | None = None,
      seed: int | None = None,
  ) -> None:
      super().__init__()
      self.train_batch_size = train_batch_size
      self.eval_batch_size = eval_batch_size
      self.num_workers = num_workers
      self.test_split_mode = test_split_mode
      self.test_split_ratio = test_split_ratio
      self.val_split_mode = val_split_mode
      self.val_split_ratio = val_split_ratio
      self.seed = seed
  
      self.train_data: AnomalibDataset
      self.val_data: AnomalibDataset
      self.test_data: AnomalibDataset
  
      self._samples: DataFrame | None = None
  
imports: from __future__ import annotations
  import logging
  from abc import ABC
  from typing import Any
  from pandas import DataFrame
  from pytorch_lightning import LightningDataModule
  from pytorch_lightning.utilities.types import EVAL_DATALOADERS, TRAIN_DATALOADERS
  from torch.utils.data.dataloader import DataLoader, default_collate
  from anomalib.data.base.dataset import AnomalibDataset
  from anomalib.data.synthetic import SyntheticAnomalyDataset
  from anomalib.data.utils import TestSplitMode, ValSplitMode, random_split, split_by_label
label_desc: Use image node_id 1 to create a new AnomalibDataModule object from inherited base classes: LightningDataModule, ABC with example: obj = AnomalibDataModule(train_batch_size, eval_batch_size, num_workers, val_split_mode, val_split_ratio, test_split_mode, test_split_ratio, seed)