def generate_figure(self) -> tuple[Figure, str]:
        """Generate a figure showing the ROC curve.

        The figure includes the ROC curve, a baseline representing random
        performance, and the AUROC score.

        Returns:
            tuple[Figure, str]: Tuple containing both the figure and the figure
                title to be used for logging
        """
        fpr, tpr = self._compute()
        auroc = self.compute()

        xlim = (0.0, 1.0)
        ylim = (0.0, 1.0)
        xlabel = "False Positive Rate"
        ylabel = "True Positive Rate"
        loc = "lower right"
        title = "ROC"

        fig, axis = plot_figure(fpr, tpr, auroc, xlim, ylim, xlabel, ylabel, loc, title)

        axis.plot(
            [0, 1],
            [0, 1],
            color="navy",
            lw=2,
            linestyle="--",
            figure=fig,
        )

        return fig, title
Generate a figure showing the ROC curve.

        The figure includes the ROC curve, a baseline representing random
        performance, and the AUROC score.

        Returns:
            tuple[Figure, str]: Tuple containing both the figure and the figure
                title to be used for logging
        
src/anomalib/metrics/auroc.py