code: def get_optimizer_parameters_for_bert(module, config):
      lr = config.optimizer.params.lr
      model_config = config.model_config.get(config.model, {})
      finetune_lr_multiplier = model_config.get(
          "finetune_lr_multiplier", 1
      )
  
      # For pretraining or when finetune_lr_multiplier == 1, all modules will be trained
      # with default lr.
      if (
          module.config.training_head_type == "pretraining"
          or finetune_lr_multiplier == 1
      ):
          return get_bert_configured_parameters(module)
  
      # For non pretraining heads, where finetune_lr_multiplier != 1, all modules other
      # than classifier will be trained with (lr * finetune_lr_multiplier).
      parameters = []
      for name, submodule in module.named_children():
          if name == "classifier":
              continue
          parameters += get_bert_configured_parameters(
              submodule, lr * finetune_lr_multiplier
          )
          logger.info(
              f"Overriding {name} module's LR to {lr * finetune_lr_multiplier}"
          )
      # Classifier will be trained with default lr.
      parameters += get_bert_configured_parameters(module.classifier)
  
      return parameters
  
imports: import logging
  from torch import nn
label_desc: Use image node_id 2 for calling a global function with example usage: get_optimizer_parameters_for_bert(module, config) and returns: parameters, get_bert_configured_parameters