code: def cpu_usage_metrics(
      *,
      minibatch=False,
      epoch=False,
      epoch_running=False,
      experience=False,
      stream=False,
  ) -> List[CPUPluginMetric]:
      """
      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
          CPU usage
      :param epoch: If True, will return a metric able to log the epoch
          CPU usage
      :param epoch_running: If True, will return a metric able to log the running
          epoch CPU usage.
      :param experience: If True, will return a metric able to log the experience
          CPU usage.
      :param stream: If True, will return a metric able to log the evaluation
          stream CPU usage.
  
      :return: A list of plugin metrics.
      """
  
      metrics: List[CPUPluginMetric] = []
      if minibatch:
          metrics.append(MinibatchCPUUsage())
  
      if epoch:
          metrics.append(EpochCPUUsage())
  
      if epoch_running:
          metrics.append(RunningEpochCPUUsage())
  
      if experience:
          metrics.append(ExperienceCPUUsage())
  
      if stream:
          metrics.append(StreamCPUUsage())
  
      return metrics
  
imports: import os
  import warnings
  from typing import Optional, List
  from psutil import Process
  from avalanche.evaluation import Metric, PluginMetric, GenericPluginMetric
  from avalanche.evaluation.metrics import Mean
label_desc: Use image node_id 1 for calling a global function with example usage: cpu_usage_metrics() and returns: metrics