def result_key(self, k: int) -> Optional[float]:
        """
        Compute the forgetting for a specific key.

        :param k: the key for which returning forgetting.

        :return: the difference between the first and last value encountered
            for k, if k is not None. It returns None if k has not been updated
            at least twice.
        """
        assert k is not None
        if k in self.initial and k in self.last:
            return self.initial[k] - self.last[k]
        else:
            return None

        Compute the forgetting for a specific key.

        :param k: the key for which returning forgetting.

        :return: the difference between the first and last value encountered
            for k, if k is not None. It returns None if k has not been updated
            at least twice.
        
avalanche/evaluation/metrics/forgetting_bwt.py