def generate_jobs(
        self,
        args: dict | None = None,
        prev_stage_result: EnsemblePredictions | None = None,
    ) -> Generator[MergeJob, None, None]:
        """Return a generator producing a single merging job.

        Args:
            args (dict): Tiled ensemble pipeline args.
            prev_stage_result (EnsemblePredictions): Ensemble predictions from predict step.

        Returns:
            Generator[MergeJob, None, None]: MergeJob generator
        """
        del args  # args not used here

        tiler = get_ensemble_tiler(self.tiling_args)
        if prev_stage_result is not None:
            yield MergeJob(prev_stage_result, tiler)
        else:
            msg = "Merging job requires tile level predictions from previous step."
            raise ValueError(msg)
Return a generator producing a single merging job.

        Args:
            args (dict): Tiled ensemble pipeline args.
            prev_stage_result (EnsemblePredictions): Ensemble predictions from predict step.

        Returns:
            Generator[MergeJob, None, None]: MergeJob generator
        
src/anomalib/pipelines/tiled_ensemble/components/merging.py