code: def get_candidate_pool_tensor_zeshel(
      entity_dict,
      tokenizer,
      max_seq_length,
      logger,
  ):
      candidate_pool = {}
      for src in range(len(WORLDS)):
          if entity_dict.get(src, None) is None:
              continue
          logger.info(
              "Get candidate desc to id for pool %s" % WORLDS[src]
          )
          candidate_pool[src] = get_candidate_pool_tensor(
              entity_dict[src],
              tokenizer,
              max_seq_length,
              logger,
          )
  
      return candidate_pool
  
imports: import argparse
  import json
  import logging
  import os
  import torch
  from tqdm import tqdm
  from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset
  from pytorch_transformers.tokenization_bert import BertTokenizer
  from blink.biencoder.biencoder import BiEncoderRanker
  import blink.biencoder.data_process
  import blink.biencoder.nn_prediction
  import blink.candidate_ranking.utils
  from blink.biencoder.zeshel_utils import WORLDS, load_entity_dict_zeshel, Stats
  from blink.common.params import BlinkParser
label_desc: Use image node_id 2 for calling a global function with example usage: get_candidate_pool_tensor_zeshel(entity_dict, tokenizer, max_seq_length, logger) and returns: candidate_pool