code: def load_entity_dict(params):
      entity_dict = {}
      entity_map = {}
      for src in WORLDS:
          fname = os.path.join(params.document_path, src + ".json")
          assert os.path.isfile(fname), "File not found! %s" % fname
          cur_dict = {}
          doc_map = {}
          doc_list = []
          with open(fname, "rt") as f:
              for line in f:
                  line = line.rstrip()
                  item = json.loads(line)
                  doc_id = item["document_id"]
                  title = item["title"]
                  text = item["text"]
                  doc_map[doc_id] = len(doc_list)
                  doc_list.append(item)
  
          logger.info("Load for world %s." % src)
          entity_dict[src] = doc_list
          entity_map[src] = doc_map
  
      return entity_dict, entity_map
  
file_path: BLINK/examples/zeshel/create_BLINK_zeshel_data.py
imports: import argparse
  import json
  import logging
  import os
  import random
  import time
  import torch
  from datetime import timedelta
label_desc: Use image node_id 1 for calling a global function with example usage: load_entity_dict(params) and returns: entity_dict,  entity_map