class_docstr: A plugin to monitor the labels repartition.
  
  :param image_creator: The function to use to create an image from the
      history of the labels repartition. It will receive a dictionary of the
      form {label_id: [count_at_step_0, count_at_step_1, ...], ...}
      and the list of the corresponding steps [step_0, step_1, ...].
      If set to None, only the raw data is emitted.
  :param mode: Indicates if this plugin should run on train or eval.
  :param emit_reset_at: The refreshment rate of the plugin.
  :return: The list of corresponding plugins.
class_docstr_tok: ["A","plugin","to","monitor","the","labels","repartition",".",":","param","image_creator",":","The","function","to","use","to","create","an","image","from","the","history","of","the","labels","repartition",".","It","will","receive","a","dictionary","of","the","form","{","label_id",":","[","count_at_step_0",",","count_at_step_1",",","...","]",",","...","}","and","the","list","of","the","corresponding","steps","[","step_0",",","step_1",",","...","]",".","If","set","to","None",",","only","the","raw","data","is","emitted",".",":","param","mode",":","Indicates","if","this","plugin","should","run","on","train","or","eval",".",":","param","emit_reset_at",":","The","refreshment","rate","of","the","plugin",".",":","return",":","The","list","of","corresponding","plugins","."]
code: def _package_result(
      self, strategy: "SupervisedTemplate"
  ) -> "MetricResult":
      assert strategy.experience is not None
  
      self.steps.append(strategy.clock.train_iterations)
      task2label2count = self._metric.result()
  
      for task, label2count in task2label2count.items():
          for label, count in label2count.items():
              self.task2label2counts[task].setdefault(
                  label, [0] * (len(self.steps) - 2)
              ).extend((count, count))
  
      for task, label2counts in self.task2label2counts.items():
          for label, counts in label2counts.items():
              counts.extend([0] * (len(self.steps) - len(counts)))
  
      return [
          MetricValue(
              self,
              name=f"Repartition"
              f"/{self._mode}_phase"
              f"/{stream_type(strategy.experience)}_stream"
              f"/Task_{task:03}",
              value=AlternativeValues(
                  self.image_creator(label2counts, self.steps),
                  label2counts,
              )
              if self.image_creator is not None
              else label2counts,
              x_plot=strategy.clock.train_iterations,
          )
          for task, label2counts in self.task2label2counts.items()
      ]
  
imports: from collections import defaultdict
  from typing import Callable, Dict, Sequence, TYPE_CHECKING, Optional, List, Counter, overload
  from matplotlib.figure import Figure
  from avalanche.evaluation import GenericPluginMetric, Metric, PluginMetric
  from avalanche.evaluation.metric_results import MetricValue, AlternativeValues
  from avalanche.evaluation.metric_utils import stream_type, default_history_repartition_image_creator
  from typing_extensions import Literal
label_desc: Use image node_id 8 for calling the LabelsRepartitionPlugin obj's underlying member method code with example usage: obj._package_result(strategy) and returns: unknown