code: def get_lr_scheduler(
      optimizer, total_steps, warmup_steps=2000, last_epoch=-1
  ):
      # warmup_steps = int(total_steps * warmup_ratio)
      lr_scheduler = get_linear_schedule_with_warmup(
          optimizer,
          num_warmup_steps=warmup_steps,
          num_training_steps=total_steps,
          last_epoch=last_epoch,
      )
      # lr_scheduler = LinearWarmupLR(optimizer, total_steps=total_steps, warmup_steps=warmup_steps)
      return lr_scheduler
  
file_path: colossalai/examples/community/roberta/pretraining/pretrain_utils.py
imports: import os
  import sys
  import torch
  import transformers
  from transformers import get_linear_schedule_with_warmup
  from colossalai.legacy.core import global_context
  from colossalai.nn.optimizer import HybridAdam
  from collections import OrderedDict
  import torch.nn
  from model.bert import BertForMaskedLM
  from model.deberta_v2 import DebertaV2ForMaskedLM
label_desc: Use image node_id 4 for calling a global function with example usage: get_lr_scheduler(optimizer, total_steps, warmup_steps, last_epoch) and returns: lr_scheduler