def _generate_dummy_mvtec_loco_dataset(self) -> None:
        """Generates dummy MVTec LOCO AD dataset in a temporary directory using the same convention as MVTec LOCO AD."""
        # MVTec LOCO has multiple subcategories within the dataset.
        dataset_category = "dummy"

        extension = ".png"

        # Create normal images.
        for split in ("train", "validation", "test"):
            path = self.dataset_root / dataset_category / split / "good"
            if split == "train":
                num_images = self.num_train
            elif split == "val":
                num_images = self.num_val
            else:
                num_images = self.num_test

            for i in range(num_images):
                label = LabelName.NORMAL
                image_filename = path / f"{i:03}{extension}"
                self.image_generator.generate_image(label=label, image_filename=image_filename)

        # Create abnormal test images and masks.
        for abnormal_dir in ("logical_anomalies", "structural_anomalies"):
            path = self.dataset_root / dataset_category / "test" / abnormal_dir
            mask_path = self.dataset_root / dataset_category / "ground_truth" / abnormal_dir

            for i in range(self.num_test):
                label = LabelName.ABNORMAL
                image_filename = path / f"{i:03}{extension}"
                # Here, only one ground-truth mask for each abnormal image is generated
                # the structure follows the same convention as MVTec LOCO AD, e.g., image_filename/000.png
                mask_filename = mask_path / f"{i:03}/000{extension}"
                self.image_generator.generate_image(label, image_filename, mask_filename)
Generates dummy MVTec LOCO AD dataset in a temporary directory using the same convention as MVTec LOCO AD.
tests/helpers/data.py