class_docstr: The minibatch CPU usage metric.
  This plugin metric only works at training time.
  
  This metric "logs" the CPU usage for each iteration.
  
  If a more coarse-grained logging is needed, consider using
  :class:`EpochCPUUsage`.
class_docstr_tok: ["The","minibatch","CPU","usage","metric",".","This","plugin","metric","only","works","at","training","time",".","This","metric","``","logs","''","the","CPU","usage","for","each","iteration",".","If","a","more","coarse-grained","logging","is","needed",",","consider","using",":","class",":","`","EpochCPUUsage","`","."]
code: def before_training_iteration(self, strategy):
      super().before_training_iteration(strategy)
      self.update(strategy)
  
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 2 for calling the MinibatchCPUUsage obj's underlying member method code with example usage: obj.before_training_iteration(strategy) without return types