class_docstr: Average the scores of the true class by label
code: def update(self, predicted_y: Tensor, true_y: Tensor):
      assert (
          len(predicted_y.size()) == 2
      ), "Predictions need to be logits or scores, not labels"
  
      if len(true_y.size()) == 2:
          true_y = true_y.argmax(axis=1)
  
      scores = predicted_y[arange(len(true_y)), true_y]
  
      for score, label in zip(scores.tolist(), true_y.tolist()):
          self.label2mean[label].update(score)
  
imports: from abc import ABC, abstractmethod
  from collections import defaultdict
  from typing import Callable, Dict, Set, TYPE_CHECKING, List, Optional, TypeVar
  import torch
  from matplotlib.axes import Axes
  from matplotlib.figure import Figure
  from matplotlib.pyplot import subplots
  from torch import Tensor, arange
  from avalanche.evaluation import Metric, PluginMetric
  from avalanche.evaluation.metric_utils import get_metric_name
  from avalanche.evaluation.metrics import Mean
  from avalanche.evaluation.metric_results import MetricValue, AlternativeValues
  from typing_extensions import Literal
label_desc: Use image node_id 3 for calling the MeanScores obj's underlying member method code with example usage: obj.update(predicted_y, true_y) without return types