code: def get_dataset_as_dict(file_path_patterns) -> dict:
      """Read the DSTC8/SGD json dialogue data as dictionary with dialog ID as keys.
      Args:
          file_path_patterns: list or directory of files
      Returns:
          dataset_dict: dataset dictionary with dialog ID as keys
      """
      dataset_dict = {}
      if isinstance(file_path_patterns, list):
          list_fp = file_path_patterns
      else:
          list_fp = sorted(glob.glob(file_path_patterns))
      for fp in list_fp:
          if PER_FRAME_OUTPUT_FILENAME in fp:
              continue
          logging.debug("Loading file: %s", fp)
          with open(fp, encoding="UTF-8") as f:
              data = json.load(f)
              if isinstance(data, list):
                  for dial in data:
                      dataset_dict[dial["dialogue_id"]] = dial
              elif isinstance(data, dict):
                  dataset_dict.update(data)
              f.close()
      return dataset_dict
  
file_path: NeMo/nemo/collections/nlp/data/dialogue/sgd/evaluate.py
imports: import collections
  import glob
  import json
  import os
  import numpy
  from nemo.collections.nlp.metrics.sgd_metrics import ACTIVE_INTENT_ACCURACY, JOINT_CAT_ACCURACY, JOINT_GOAL_ACCURACY, JOINT_NONCAT_ACCURACY, NAN_VAL, REQUESTED_SLOTS_F1, REQUESTED_SLOTS_PRECISION, REQUESTED_SLOTS_RECALL, SLOT_TAGGING_F1, SLOT_TAGGING_PRECISION, SLOT_TAGGING_RECALL, get_active_intent_accuracy, get_average_and_joint_goal_accuracy, get_requested_slots_f1, get_slot_tagging_f1
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling a global function with example usage: get_dataset_as_dict(file_path_patterns) and returns: dataset_dict