code: def per_class_stats(self):
      stats = OrderedDict()
      for idx in sorted(self.idx2label.keys()):
          stats[self.idx2label[idx]] = self.class_stats(idx)
      return stats
  
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 35 for calling the ConfusionMatrix obj's underlying member method code with example usage: obj.per_class_stats() and returns: stats