code: def learning_rate_schedule(params, *args):
      """Learning rate schedule based on global step."""
      update_learning_rate_schedule_parameters(params, *args)
      lr_decay_method = params["lr_decay_method"]
      if lr_decay_method == "stepwise":
          return StepwiseLrSchedule(
              params["adjusted_learning_rate"],
              params["adjusted_lr_warmup_init"],
              params["lr_warmup_step"],
              params["first_lr_drop_step"],
              params["second_lr_drop_step"],
          )
  
      if lr_decay_method == "cosine":
          return CosineLrSchedule(
              params["adjusted_learning_rate"],
              params["adjusted_lr_warmup_init"],
              params["lr_warmup_step"],
              params["total_steps"],
          )
  
      if lr_decay_method == "polynomial":
          return PolynomialLrSchedule(
              params["adjusted_learning_rate"],
              params["adjusted_lr_warmup_init"],
              params["lr_warmup_step"],
              params["poly_lr_power"],
              params["total_steps"],
          )
  
      if lr_decay_method == "constant":
          return params["adjusted_learning_rate"]
  
      raise ValueError(
          "unknown lr_decay_method: {}".format(lr_decay_method)
      )
  
file_path: DALI/docs/examples/use_cases/tensorflow/efficientdet/model/utils/optimizers.py
imports: from absl import logging
  import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: learning_rate_schedule(params) and returns: StepwiseLrSchedule, CosineLrSchedule, PolynomialLrSchedule, params