code: def accuracy_metrics(
      *,
      minibatch=False,
      epoch=False,
      epoch_running=False,
      experience=False,
      stream=False,
      trained_experience=False,
  ) -> List[AccuracyPluginMetric]:
      """
      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 minibatch accuracy at training time.
      :param epoch: If True, will return a metric able to log
          the epoch accuracy at training time.
      :param epoch_running: If True, will return a metric able to log
          the running epoch accuracy at training time.
      :param experience: If True, will return a metric able to log
          the accuracy on each evaluation experience.
      :param stream: If True, will return a metric able to log
          the accuracy averaged over the entire evaluation stream of experiences.
      :param trained_experience: If True, will return a metric able to log
          the average evaluation accuracy only for experiences that the
          model has been trained on
  
      :return: A list of plugin metrics.
      """
  
      metrics: List[AccuracyPluginMetric] = []
      if minibatch:
          metrics.append(MinibatchAccuracy())
  
      if epoch:
          metrics.append(EpochAccuracy())
  
      if epoch_running:
          metrics.append(RunningEpochAccuracy())
  
      if experience:
          metrics.append(ExperienceAccuracy())
  
      if stream:
          metrics.append(StreamAccuracy())
  
      if trained_experience:
          metrics.append(TrainedExperienceAccuracy())
  
      return metrics
  
imports: from typing import List, Optional, Union, Dict
  import torch
  from torch import Tensor
  from avalanche.evaluation import Metric, GenericPluginMetric
  from avalanche.evaluation.metrics.mean import Mean
  from collections import defaultdict
label_desc: Use image node_id 1 for calling a global function with example usage: accuracy_metrics() and returns: metrics