code: def read_eval_metrics(eval_dir):
      eval_metrics_dict = defaultdict(dict)
      if gfile.Exists(eval_dir):
          for event_file in gfile.Glob(
              os.path.join(eval_dir, _EVENT_FILE_GLOB_PATTERN)
          ):
              for event in summary_iterator.summary_iterator(
                  event_file
              ):
                  if not event.HasField("summary"):
                      continue
                  metrics = {}
                  for value in event.summary.value:
                      if value.HasField("simple_value"):
                          metrics[value.tag] = value.simple_value
                  if metrics:
                      eval_metrics_dict[event.step].update(metrics)
      return eval_metrics_dict
  
imports: import os
  import copy
  from functools import partial
  from collections import defaultdict, OrderedDict
  import numpy
  from sklearn.metrics import confusion_matrix
  from tensorflow.python.platform import gfile
  from tensorflow.python.summary import summary_iterator
  import tabulate
  from finetune.encoding.input_encoder import get_spacy
label_desc: Use image node_id 26 for calling a global function with example usage: read_eval_metrics(eval_dir) and returns: eval_metrics_dict