class_docstr: Base class for the plugins that show the scores of the true class, averaged
      by new and old classes.
  
  :param image_creator: The function to use to create an image of the history
      of the mean scores grouped by old and new classes
code: def _package_result(
      self, strategy: "SupervisedTemplate"
  ) -> "MetricResult":
      label_cat2mean_score: Dict[LabelCat, float] = self.result()
      num_it = strategy.clock.train_iterations
  
      for label_cat, m in label_cat2mean_score.items():
          self.label_cat2step2mean[label_cat][num_it] = m
  
      base_metric_name = get_metric_name(
          self, strategy, add_experience=False, add_task=False
      )
  
      rv = [
          MetricValue(
              self,
              name=base_metric_name + f"/{label_cat}_classes",
              value=m,
              x_plot=num_it,
          )
          for label_cat, m in label_cat2mean_score.items()
      ]
      if (
          "old" in label_cat2mean_score
          and "new" in label_cat2mean_score
      ):
          rv.append(
              MetricValue(
                  self,
                  name=base_metric_name + f"/new_old_diff",
                  value=label_cat2mean_score["new"]
                  - label_cat2mean_score["old"],
                  x_plot=num_it,
              )
          )
      if self.image_creator is not None:
          rv.append(
              MetricValue(
                  self,
                  name=base_metric_name,
                  value=AlternativeValues(
                      self.image_creator(self.label_cat2step2mean),
                      self.label_cat2step2mean,
                  ),
                  x_plot=num_it,
              )
          )
  
      return rv
  
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 6 for calling the MeanScoresPluginMetricABC obj's underlying member method code with example usage: obj._package_result(strategy) and returns: rv