code: def lr_policy(lr_fn):
      def _alr(optimizer, iteration, epoch):
          lr = lr_fn(iteration, epoch)
          for param_group in optimizer.param_groups:
              param_group["lr"] = lr
  
          return lr
  
      return _alr
  
file_path: DALI/docs/examples/use_cases/pytorch/efficientnet/image_classification/optimizers.py
imports: import math
  import numpy
  import torch
  from torch import optim
label_desc: Use image node_id 4 for calling a global function with example usage: lr_policy(lr_fn) and returns: _alr, lr