class_docstr: Anomalib dataset.
  
  Args:
      task (str): Task type, either 'classification' or 'segmentation'
      transform (A.Compose): Albumentations Compose object describing the transforms that are applied to the inputs.
docstr: Set up the data module.
  
  This method should return a dataframe that contains the information needed by the dataloader to load each of
  the dataset items into memory.
  The dataframe must at least contain the following columns:
      split: the subset to which the dataset item is assigned.
      image_path: path to file system location where the image is stored.
      label_index: index of the anomaly label, typically 0 for "normal" and 1 for "anomalous".
      mask_path (if task == "segmentation"): path to the ground truth masks (for the anomalous images only).
  
  Example:
  |---|-------------------|-----------|-------------|------------------|-------|
  |   | image_path        | label     | label_index | mask_path        | split |
  |---|-------------------|-----------|-------------|------------------|-------|
  | 0 | path/to/image.png | anomalous | 1           | path/to/mask.png | train |
  |---|-------------------|-----------|-------------|------------------|-------|
docstr_tok: ["Set","up","the","data","module",".","This","method","should","return","a","dataframe","that","contains","the","information","needed","by","the","dataloader","to","load","each","of","the","dataset","items","into","memory",".","The","dataframe","must","at","least","contain","the","following","columns",":","split",":","the","subset","to","which","the","dataset","item","is","assigned",".","image_path",":","path","to","file","system","location","where","the","image","is","stored",".","label_index",":","index","of","the","anomaly","label",",","typically","0","for","``","normal","''","and","1","for","``","anomalous","''",".","mask_path","(","if","task","==","``","segmentation","''",")",":","path","to","the","ground","truth","masks","(","for","the","anomalous","images","only",")",".","Example",":","|","--","-|","--","--","--","--","--","--","--","--","--","-|","--","--","--","--","--","-|","--","--","--","--","--","--","-|","--","--","--","--","--","--","--","--","--","|","--","--","--","-|","|","|","image_path","|","label","|","label_index","|","mask_path","|","split","|","|","--","-|","--","--","--","--","--","--","--","--","--","-|","--","--","--","--","--","-|","--","--","--","--","--","--","-|","--","--","--","--","--","--","--","--","--","|","--","--","--","-|","|","0","|","path\/to\/image.png","|","anomalous","|","1","|","path\/to\/mask.png","|","train","|","|","--","-|","--","--","--","--","--","--","--","--","--","-|","--","--","--","--","--","-|","--","--","--","--","--","--","-|","--","--","--","--","--","--","--","--","--","|","--","--","--","-|"]
code: def _setup(self) -> DataFrame:
      """Set up the data module.
  
      This method should return a dataframe that contains the information needed by the dataloader to load each of
      the dataset items into memory.
      The dataframe must at least contain the following columns:
          split: the subset to which the dataset item is assigned.
          image_path: path to file system location where the image is stored.
          label_index: index of the anomaly label, typically 0 for "normal" and 1 for "anomalous".
          mask_path (if task == "segmentation"): path to the ground truth masks (for the anomalous images only).
  
      Example:
      |---|-------------------|-----------|-------------|------------------|-------|
      |   | image_path        | label     | label_index | mask_path        | split |
      |---|-------------------|-----------|-------------|------------------|-------|
      | 0 | path/to/image.png | anomalous | 1           | path/to/mask.png | train |
      |---|-------------------|-----------|-------------|------------------|-------|
      """
      raise NotImplementedError
  
imports: from __future__ import annotations
  import copy
  import logging
  from abc import ABC, abstractmethod
  from pathlib import Path
  from typing import Sequence
  import albumentations
  import cv2
  import numpy
  import pandas
  from pandas import DataFrame
  from torch import Tensor
  from torch.utils.data import Dataset
  from anomalib.data.task_type import TaskType
  from anomalib.data.utils import masks_to_boxes, read_image
label_desc: Use image node_id 12 for calling the AnomalibDataset obj's underlying member method code with example usage: obj._setup() without return types