def update(
        self,
        predicted_y: Tensor,
        true_y: Tensor,
        task_labels: Union[int, Tensor],
    ) -> None:
        """
        Update the running accuracy given the true and predicted labels for each
        class.

        This will update the accuracies for the "current stream" (the one set
        through `next_experience`). If `next_experience` has not been called,
        then an error will be raised.

        :param predicted_y: The model prediction. Both labels and logit vectors
            are supported.
        :param true_y: The ground truth. Both labels and one-hot vectors
            are supported.
        :param task_labels: the int task label associated to the current
            experience or the task labels vector showing the task label
            for each pattern.
        :return: None.
        """
        if self._current_stream is None:
            raise RuntimeError(
                "No current stream set. " 'Call "set_stream" to set the current stream.'
            )

        if self._is_stream_tracked(self._current_stream):
            self._amcas[self._current_stream].update(predicted_y, true_y, task_labels)

        Update the running accuracy given the true and predicted labels for each
        class.

        This will update the accuracies for the "current stream" (the one set
        through `next_experience`). If `next_experience` has not been called,
        then an error will be raised.

        :param predicted_y: The model prediction. Both labels and logit vectors
            are supported.
        :param true_y: The ground truth. Both labels and one-hot vectors
            are supported.
        :param task_labels: the int task label associated to the current
            experience or the task labels vector showing the task label
            for each pattern.
        :return: None.
        
avalanche/evaluation/metrics/amca.py