code: def load_gold_data(path: str, load_gold: bool = False):
      """
      Load gold file (test.jsonl) in a single dictionary, indexed by filename.
  
      :param path: Path to gold file
      :param load_gold: When evaluating gold hypotheses upper bound
      :return: Dictionary of gold examples
      """
      data_path = os.path.join(path)
      result = {}
      with open(data_path, "r") as f:
          lines = list(f)
          bar = Bar(message="Loading gold data", max=len(lines))
          for line in lines:
              example = json.loads(line)
              result.update(release2prediction(example, load_gold))
              bar.next()
          bar.finish()
      return result
  
file_path: espnet/egs2/uslu14/asr1/local/evaluation/util.py
imports: import json
  import logging
  import os
  from typing import Any, Dict, Tuple
  import tabulate
  from progress.bar import Bar
label_desc: Use image node_id 2 for calling a global function with example usage: load_gold_data(path, load_gold) and returns: result