code: def get_optimizer(model, params):
      return get_bert_optimizer(
          [model],
          params["type_optimization"],
          params["learning_rate"],
          fp16=params.get("fp16"),
      )
  
imports: import os
  import argparse
  import faiss
  import pickle
  import torch
  import json
  import sys
  import io
  import random
  import time
  import traceback
  import numpy
  from scipy.special import softmax, expit
  import torch.nn.functional
  from multiprocessing.pool import ThreadPool
  from tqdm import tqdm, trange
  from collections import OrderedDict
  from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset
  from pytorch_transformers.file_utils import PYTORCH_PRETRAINED_BERT_CACHE
  from pytorch_transformers.optimization import WarmupLinearSchedule
  from pytorch_transformers.tokenization_bert import BertTokenizer
  from elq.biencoder.biencoder import BiEncoderRanker
  from elq.vcg_utils.measures import entity_linking_tp_with_overlap
  import logging
  import elq.candidate_ranking.utils
  from elq.biencoder.data_process import process_mention_data
  from blink.biencoder.zeshel_utils import DOC_PATH, WORLDS, world_to_id
  from blink.common.optimizer import get_bert_optimizer
  from elq.common.params import ElqParser
  from elq.index.faiss_indexer import DenseFlatIndexer, DenseHNSWFlatIndexer, DenseIVFFlatIndexer
label_desc: Use image node_id 2 for calling a global function with example usage: get_optimizer(model, params) and returns: get_bert_optimizer