code: def load_entity_dict_zeshel(logger, params):
      entity_dict = {}
      # different worlds in train/valid/test
      if params["mode"] == "train":
          start_idx = 0
          end_idx = 8
      elif params["mode"] == "valid":
          start_idx = 8
          end_idx = 12
      else:
          start_idx = 12
          end_idx = 16
      # load data
      for i, src in enumerate(WORLDS[start_idx:end_idx]):
          fname = DOC_PATH + src + ".json"
          cur_dict = {}
          doc_list = []
          src_id = world_to_id[src]
          with open(fname, "rt") as f:
              for line in f:
                  line = line.rstrip()
                  item = json.loads(line)
                  text = item["text"]
                  doc_list.append(text[:256])
  
                  if params["debug"]:
                      if len(doc_list) > 200:
                          break
  
          logger.info("Load for world %s." % src)
          entity_dict[src_id] = doc_list
      return entity_dict
  
imports: import json
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: load_entity_dict_zeshel(logger, params) and returns: entity_dict