def result_task_label(self, task_label: int):
        """
        Retrieves the running average loss per pattern for a specific task.

        Calling this method will not change the internal state of the metric.
        :param task_label: The task label
        :return: A dictionary `{task_label: mean_loss}`.
        """
        assert task_label is not None
        return {task_label: self._mean_loss[task_label].result()}

        Retrieves the running average loss per pattern for a specific task.

        Calling this method will not change the internal state of the metric.
        :param task_label: The task label
        :return: A dictionary `{task_label: mean_loss}`.
        
avalanche/evaluation/metrics/loss.py