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

        :param k: the key for which returning forward transfer.

        :return: the difference between the key value after training on the
            previous experience, and the key at random initialization.
            It returns None if k has not been updated at least twice.
        """
        assert k is not None

        if k in self.previous:
            return self.previous[k] - self.initial[k]
        else:
            return None

        Compute the forward transfer for a specific key.

        :param k: the key for which returning forward transfer.

        :return: the difference between the key value after training on the
            previous experience, and the key at random initialization.
            It returns None if k has not been updated at least twice.
        
avalanche/evaluation/metrics/forward_transfer.py