code: def class_accuracy_metrics(
      *,
      minibatch=False,
      epoch=False,
      epoch_running=False,
      experience=False,
      stream=False,
      classes=None,
  ) -> List[ClassAccuracyPluginMetric]:
      """
      Helper method that can be used to obtain the desired set of
      plugin metrics.
  
      :param minibatch: If True, will return a metric able to log
          the per-class minibatch accuracy at training time.
      :param epoch: If True, will return a metric able to log
          the per-class epoch accuracy at training time.
      :param epoch_running: If True, will return a metric able to log
          the per-class  running epoch accuracy at training time.
      :param experience: If True, will return a metric able to log
          the per-class accuracy on each evaluation experience.
      :param stream: If True, will return a metric able to log
          the per-class accuracy averaged over the entire evaluation stream of
          experiences.
      :param classes: The list of classes to track. See the corresponding
          parameter of :class:`ClassAccuracy` for a precise explanation.
  
      :return: A list of plugin metrics.
      """
      metrics: List[ClassAccuracyPluginMetric] = []
      if minibatch:
          metrics.append(MinibatchClassAccuracy(classes=classes))
  
      if epoch:
          metrics.append(EpochClassAccuracy(classes=classes))
  
      if epoch_running:
          metrics.append(RunningEpochClassAccuracy(classes=classes))
  
      if experience:
          metrics.append(ExperienceClassAccuracy(classes=classes))
  
      if stream:
          metrics.append(StreamClassAccuracy(classes=classes))
  
      return metrics
  
imports: from typing import Dict, List, Set, Union, TYPE_CHECKING, Iterable, Optional
  from collections import defaultdict, OrderedDict
  import torch
  from torch import Tensor
  from avalanche.evaluation import Metric, PluginMetric, _ExtendedGenericPluginMetric, _ExtendedPluginMetricValue
  from avalanche.evaluation.metric_utils import default_metric_name_template, generic_get_metric_name
  from avalanche.evaluation.metrics import Mean
label_desc: Use image node_id 1 for calling a global function with example usage: class_accuracy_metrics() and returns: metrics