code: def build_lr_scheduler(args, step_each_epoch):
      """
      Build a learning rate scheduler.
  
      Args:
          args(Namespace): Arguments obtained from ArgumentParser.
          step_each_epoch(int): The number of steps in each epoch.
      return:
          lr(paddle.optimizer.lr.LRScheduler): A learning rate scheduler.
      """
      # Turn last_epoch to last_step, since we update lr each step instead of each epoch.
      last_step = args.start_epoch * step_each_epoch - 1
      learning_rate_mod = sys.modules[__name__]
      lr = getattr(learning_rate_mod, args.lr_scheduler)(
          args, step_each_epoch, last_step
      )
      if not isinstance(lr, paddle.optimizer.lr.LRScheduler):
          lr = lr()
      logging.info("build lr %s success..", lr)
      return lr
  
imports: import sys
  import logging
  import paddle
label_desc: Use image node_id 1 for calling a global function with example usage: build_lr_scheduler(args, step_each_epoch) and returns: lr