class_docstr: Kolektor Datamodule.
  
  Args:
      root (Path | str): Path to the root of the dataset
      image_size (int | tuple[int, int] | None, optional): Size of the input image.
          Defaults to None.
      center_crop (int | tuple[int, int] | None, optional): When provided, the images will be center-cropped
          to the provided dimensions.
      normalize (bool): When True, the images will be normalized to the ImageNet statistics.
      train_batch_size (int, optional): Training batch size. Defaults to 32.
      eval_batch_size (int, optional): Test batch size. Defaults to 32.
      num_workers (int, optional): Number of workers. Defaults to 8.
      task TaskType): Task type, 'classification', 'detection' or 'segmentation'
      transform_config_train (str | A.Compose | None, optional): Config for pre-processing
          during training.
          Defaults to None.
      transform_config_val (str | A.Compose | None, optional): Config for pre-processing
          during validation.
          Defaults to None.
      test_split_mode (TestSplitMode): Setting that determines how the testing subset is obtained.
      test_split_ratio (float): Fraction of images from the train set that will be reserved for testing.
          Defaults to 0.2
      val_split_mode (ValSplitMode): Setting that determines how the validation subset is obtained.
      val_split_ratio (float): Fraction of train or test images that will be reserved for validation.
          Defaults to 0.5
      seed (int | None, optional): Seed which may be set to a fixed value for reproducibility.
class_docstr_tok: ["Kolektor","Datamodule",".","Args",":","root","(","Path","|","str",")",":","Path","to","the","root","of","the","dataset","image_size","(","int","|","tuple","[","int",",","int","]","|","None",",","optional",")",":","Size","of","the","input","image",".","Defaults","to","None",".","center_crop","(","int","|","tuple","[","int",",","int","]","|","None",",","optional",")",":","When","provided",",","the","images","will","be","center-cropped","to","the","provided","dimensions",".","normalize","(","bool",")",":","When","True",",","the","images","will","be","normalized","to","the","ImageNet","statistics",".","train_batch_size","(","int",",","optional",")",":","Training","batch","size",".","Defaults","to","32.","eval_batch_size","(","int",",","optional",")",":","Test","batch","size",".","Defaults","to","32.","num_workers","(","int",",","optional",")",":","Number","of","workers",".","Defaults","to","8.","task","TaskType",")",":","Task","type",",","'classification","'",",","'detection","'","or","'segmentation'","transform_config_train","(","str","|","A.Compose","|","None",",","optional",")",":","Config","for","pre-processing","during","training",".","Defaults","to","None",".","transform_config_val","(","str","|","A.Compose","|","None",",","optional",")",":","Config","for","pre-processing","during","validation",".","Defaults","to","None",".","test_split_mode","(","TestSplitMode",")",":","Setting","that","determines","how","the","testing","subset","is","obtained",".","test_split_ratio","(","float",")",":","Fraction","of","images","from","the","train","set","that","will","be","reserved","for","testing",".","Defaults","to","0.2","val_split_mode","(","ValSplitMode",")",":","Setting","that","determines","how","the","validation","subset","is","obtained",".","val_split_ratio","(","float",")",":","Fraction","of","train","or","test","images","that","will","be","reserved","for","validation",".","Defaults","to","0.5","seed","(","int","|","None",",","optional",")",":","Seed","which","may","be","set","to","a","fixed","value","for","reproducibility","."]
docstr: Download the dataset if not available.
docstr_tok: ["Download","the","dataset","if","not","available","."]
code: def prepare_data(self) -> None:
      """Download the dataset if not available."""
      if (self.root).is_dir():
          logger.info("Found the dataset.")
      else:
          download_and_extract(self.root, DOWNLOAD_INFO)
  
imports: from __future__ import annotations
  import logging
  from pathlib import Path
  import albumentations
  import numpy
  from cv2 import imread
  from pandas import DataFrame
  from sklearn.model_selection import train_test_split
  from anomalib.data.base import AnomalibDataModule, AnomalibDataset
  from anomalib.data.task_type import TaskType
  from anomalib.data.utils import DownloadInfo, InputNormalizationMethod, Split, TestSplitMode, ValSplitMode, download_and_extract, get_transforms
label_desc: Use image node_id 2 for calling the Kolektor obj's underlying member method code with example usage: obj.prepare_data() without return types