def result(self) -> float:
        """
        Retrieves the mean.

        Calling this method will not change the internal state of the metric.

        :return: The mean, as a float.
        """
        if self.weight == 0.0:
            return 0.0
        return self.summed / self.weight

        Retrieves the mean.

        Calling this method will not change the internal state of the metric.

        :return: The mean, as a float.
        
avalanche/evaluation/metrics/mean.py