code: def stats(self):
      return {
          "token_accuracy": self.token_accuracy(),
          "avg_precision_macro": self.avg_precision(average="macro"),
          "avg_recall_macro": self.avg_recall(average="macro"),
          "avg_f1_score_macro": self.avg_f1_score(average="macro"),
          "avg_precision_micro": self.avg_precision(average="micro"),
          "avg_recall_micro": self.avg_recall(average="micro"),
          "avg_f1_score_micro": self.avg_f1_score(average="micro"),
          "avg_precision_weighted": self.avg_precision(average="micro"),
          "avg_recall_weighted": self.avg_recall(average="micro"),
          "avg_f1_score_weighted": self.avg_f1_score(
              average="weighted"
          ),
          "kappa_score": self.kappa_score(),
      }
  
imports: import logging
  from collections import OrderedDict
  import numpy
  from sklearn import metrics
  from sklearn.metrics import confusion_matrix
label_desc: Use image node_id 36 for calling the ConfusionMatrix obj's underlying member method code with example usage: obj.stats() and returns: dict