code: def build_optimizer(args, lr):
      """
      Build a raw optimizer with learning rate scheduler.
  
      Args:
          args(Namespace): Arguments obtained from ArgumentParser.
          lr(paddle.optimizer.lr.LRScheduler): A LRScheduler used for training.
      return:
          optim(paddle.optimizer): A normal optmizer.
      """
      optimizer_mod = sys.modules[__name__]
      opt = getattr(optimizer_mod, args.optimizer)(
          args, learning_rate=lr
      )()
      logging.info("build optimizer %s success..", opt)
      return opt
  
imports: import sys
  import logging
  from paddle import optimizer
label_desc: Use image node_id 1 for calling a global function with example usage: build_optimizer(args, lr) and returns: opt