def on_predict_batch_end(
        self,
        trainer: Trainer,
        pl_module: AnomalibModule,
        outputs: STEP_OUTPUT | None,
        batch: Any,  # noqa: ANN401
        batch_idx: int,
        dataloader_idx: int = 0,
    ) -> None:
        """Generate visualizations at the end of a prediction batch.

        Args:
            trainer (Trainer): PyTorch Lightning trainer instance.
            pl_module (AnomalibModule): The module being used for prediction.
            outputs (STEP_OUTPUT | None): Outputs from the prediction step.
            batch (Any): Current batch of data.
            batch_idx (int): Index of the current batch.
            dataloader_idx (int, optional): Index of the dataloader. Defaults to 0.

        Note:
            This method calls :meth:`on_test_batch_end` internally.
        """
        return self.on_test_batch_end(trainer, pl_module, outputs, batch, batch_idx, dataloader_idx)
Generate visualizations at the end of a prediction batch.

        Args:
            trainer (Trainer): PyTorch Lightning trainer instance.
            pl_module (AnomalibModule): The module being used for prediction.
            outputs (STEP_OUTPUT | None): Outputs from the prediction step.
            batch (Any): Current batch of data.
            batch_idx (int): Index of the current batch.
            dataloader_idx (int, optional): Index of the dataloader. Defaults to 0.

        Note:
            This method calls :meth:`on_test_batch_end` internally.
        
src/anomalib/callbacks/visualizer.py