docstr: save metrics into the object result class
  
  Args:
      evaluation_result(dict): key-value pair for metric
          - key: metric name
          - value: metric dict. The dict should either
          (1) have a `class` keyword, with key-value pair of class name and corresponding values, or
          (2) have a `average` keyword to show a macro-average metric.
docstr_tok: ["save","metrics","into","the","object","result","class","Args",":","evaluation_result","(","dict",")",":","key-value","pair","for","metric","-","key",":","metric","name","-","value",":","metric","dict",".","The","dict","should","either","(","1",")","have","a","`","class","`","keyword",",","with","key-value","pair","of","class","name","and","corresponding","values",",","or","(","2",")","have","a","`","average","`","keyword","to","show","a","macro-average","metric","."]
code: def load_results_from_meta(self, evaluation_result: dict):
      """
      save metrics into the object result class
  
      Args:
          evaluation_result(dict): key-value pair for metric
              - key: metric name
              - value: metric dict. The dict should either
              (1) have a `class` keyword, with key-value pair of class name and corresponding values, or
              (2) have a `average` keyword to show a macro-average metric.
      """
      for metric, values in evaluation_result.items():
          if metric == constants.METRIC_CM:
              self.confusion_matrices = ConfusionMatrix(
                  label=values["labels"],
                  confusion_matrix=values["values"],
              )
          else:
              if type(values) != dict:
                  continue
              else:
                  if "class" in values.keys():
                      class_values = values["class"]
                      for (
                          class_label,
                          class_value,
                      ) in class_values.items():
                          self.update_result(
                              metric, class_label, class_value
                          )
                  if "average" in values.keys():
                      self.average_result_dict[metric] = values[
                          "average"
                      ]
  
file_path: contextual-ai/xai/model/evaluation/multi_classification_result.py
imports: from collections import defaultdict
  from xai import constants
  from xai.model.evaluation.basic_result import ClassificationResult
  from xai.model.evaluation.confusion_matrix import ConfusionMatrix
  from xai.util import get_table_layout
label_desc: Use image node_id 2 for calling the MultiClassificationResult obj's underlying member method code with example usage: obj.load_results_from_meta(evaluation_result) without return types