code: def load_candidate_pool(
      tokenizer,
      params,
      logger,
      cand_pool_path,
  ):
      candidate_pool = None
      # try to load candidate pool from file
      try:
          logger.info("Loading pre-generated candidate pool from: ")
          logger.info(cand_pool_path)
          candidate_pool = torch.load(cand_pool_path)
      except:
          logger.info("Loading failed.")
      assert candidate_pool is not None
  
      return candidate_pool
  
file_path: BLINK/scripts/generate_candidates.py
imports: import torch
  from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset
  from elq.biencoder.biencoder import load_biencoder
  import elq.candidate_ranking.utils
  import json
  import sys
  import os
  from tqdm import tqdm
  import argparse
label_desc: Use image node_id 2 for calling a global function with example usage: load_candidate_pool(tokenizer, params, logger, cand_pool_path) and returns: candidate_pool