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","."]
docstr: Checks if setup() has been called.
  
  At least one of [train_data, val_data, test_data] should be setup.
docstr_tok: ["Checks","if","setup","(",")","has","been","called",".","At","least","one","of","[","train_data",",","val_data",",","test_data","]","should","be","setup","."]
code: def is_setup(self) -> bool:
      """Checks if setup() has been called.
  
      At least one of [train_data, val_data, test_data] should be setup.
      """
      _is_setup: bool = False
      for data in ("train_data", "val_data", "test_data"):
          if hasattr(self, data):
              if getattr(self, data).is_setup:
                  _is_setup = True
  
      return _is_setup
  
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 6 for calling the AnomalibDataModule obj's underlying member method code with example usage: obj.is_setup() and returns: _is_setup