code: def get_preds(pred_dir):
      events = os.listdir(pred_dir)
      boxes = dict()
      pbar = tqdm.tqdm(events)
  
      for event in pbar:
          pbar.set_description("Reading Predictions ")
          event_dir = os.path.join(pred_dir, event)
          event_images = os.listdir(event_dir)
          current_event = dict()
          for imgtxt in event_images:
              imgname, _boxes = read_pred_file(
                  os.path.join(event_dir, imgtxt)
              )
              current_event[imgname.rstrip(".jpg")] = _boxes
          boxes[event] = current_event
      return boxes
  
imports: from __future__ import absolute_import
  import os
  import tqdm
  import pickle
  import datetime
  import argparse
  import numpy
  from scipy.io import loadmat
label_desc: Use image node_id 9 for calling a global function with example usage: get_preds(pred_dir) and returns: boxes