def run(self, task_id: int | None = None) -> list[Any] | None:
        """Run normalization job which normalizes image, pixel and box scores.

        Args:
            task_id: Not used in this case.

        Returns:
            list[Any]: List of normalized predictions.
        """
        del task_id  # not needed here

        # load all statistics needed for normalization
        stats_path = self.root_dir / "weights" / "lightning" / "stats.json"
        with stats_path.open("r") as f:
            stats = json.load(f)
        minmax = stats["minmax"]
        image_threshold = stats["image_threshold"]
        pixel_threshold = stats["pixel_threshold"]

        logger.info("Starting normalization.")

        for data in tqdm(self.predictions, desc="Normalizing"):
            data.pred_score = normalize(
                data.pred_score,
                image_threshold,
                minmax["pred_score"]["min"],
                minmax["pred_score"]["max"],
            )
            if hasattr(data, "anomaly_map"):
                data.anomaly_map = normalize(
                    data.anomaly_map,
                    pixel_threshold,
                    minmax["anomaly_map"]["min"],
                    minmax["anomaly_map"]["max"],
                )

        return self.predictions
Run normalization job which normalizes image, pixel and box scores.

        Args:
            task_id: Not used in this case.

        Returns:
            list[Any]: List of normalized predictions.
        
src/anomalib/pipelines/tiled_ensemble/components/normalization.py