code: def get_optimizer(self, lr, optimizer_type="lamb"):
      # Prepare optimiser and schedule
      no_decay = ["bias", "LayerNorm.weight"]
  
      optimizer_grouped_parameters = [
          {
              "params": [
                  p
                  for n, p in self.model.named_parameters()
                  if not any(nd in n for nd in no_decay)
              ],
              "weight_decay": self.weight_decay,
          },
          {
              "params": [
                  p
                  for n, p in self.model.named_parameters()
                  if any(nd in n for nd in no_decay)
              ],
              "weight_decay": 0.0,
          },
      ]
  
      if optimizer_type == "lamb":
          optimizer = Lamb(
              optimizer_grouped_parameters,
              weight_decay=0.1,
              lr=lr,
              eps=1e-12,
          )
      elif optimizer_type == "adamw":
          optimizer = AdamW(
              optimizer_grouped_parameters, lr=lr, eps=self.adam_epsilon
          )
  
      return optimizer
  
file_path: fast-bert/fast_bert/learner_util.py
imports: import torch
  from pathlib import Path
  import logging
  from transformers import AdamW, get_constant_schedule, get_constant_schedule_with_warmup, get_linear_schedule_with_warmup, get_cosine_schedule_with_warmup, get_cosine_with_hard_restarts_schedule_with_warmup
  from pytorch_lamb import Lamb
label_desc: Use image node_id 2 for calling the Learner obj's underlying member method code with example usage: obj.get_optimizer(lr, optimizer_type) and returns: optimizer