def generate_jobs(
        self,
        args: dict | None = None,
        prev_stage_result: list[Any] | None = None,
    ) -> Generator[ThresholdingJob, None, None]:
        """Return a generator producing a single thresholding job.

        Args:
            args: ensemble run args.
            prev_stage_result (list[Any]): Ensemble predictions from previous step.

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

        # get threshold values base on normalization
        image_threshold, pixel_threshold = get_threshold_values(self.normalization_stage, self.root_dir)

        yield ThresholdingJob(
            predictions=prev_stage_result,
            image_threshold=image_threshold,
            pixel_threshold=pixel_threshold,
        )
Return a generator producing a single thresholding job.

        Args:
            args: ensemble run args.
            prev_stage_result (list[Any]): Ensemble predictions from previous step.

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