code: def get_scheduler(params, optimizer, len_train_data, logger):
      batch_size = params["train_batch_size"]
      grad_acc = params["gradient_accumulation_steps"]
      epochs = params["num_train_epochs"]
  
      num_train_steps = (
          int(len_train_data / batch_size / grad_acc) * epochs
      )
      num_warmup_steps = int(
          num_train_steps * params["warmup_proportion"]
      )
  
      scheduler = WarmupLinearSchedule(
          optimizer,
          warmup_steps=num_warmup_steps,
          t_total=num_train_steps,
      )
      logger.info(" Num optimization steps = %d" % num_train_steps)
      logger.info(" Num warmup steps = %d", num_warmup_steps)
      return scheduler
  
imports: import os
  import argparse
  import pickle
  import torch
  import json
  import sys
  import io
  import random
  import time
  import numpy
  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 pytorch_transformers.modeling_utils import WEIGHTS_NAME
  from blink.biencoder.biencoder import BiEncoderRanker, load_biencoder
  import logging
  import blink.candidate_ranking.utils
  import blink.biencoder.data_process
  from blink.biencoder.zeshel_utils import DOC_PATH, WORLDS, world_to_id
  from blink.common.optimizer import get_bert_optimizer
  from blink.common.params import BlinkParser
label_desc: Use image node_id 3 for calling a global function with example usage: get_scheduler(params, optimizer, len_train_data, logger) and returns: scheduler