code: def get_lr_at_epoch(cfg: LRSchedulerConf, cur_epoch: float) -> float:
      """
      Retrieve the learning rate of the current epoch with the option to perform
      warm up in the beginning of the training stage.
  
      Args:
          cfg (LRSchedulerConf): Hydra / omega conf object associated with
              Learningrate scheduler. The schema can be found in
              `LRSchedulerConf` and the example configs can be found in
              `pytorchvideo_trainer/conf/module/lr_scheduler`.
          cur_epoch (float): the number of epoch of the current training stage.
      """
      lr = get_lr_func(cfg.lr_policy)(cfg, cur_epoch)
      # Perform warm up.
      if cur_epoch < cfg.warmup_iters:
          lr_start = cfg.warmup_start_lr
          lr_end = get_lr_func(cfg.lr_policy)(cfg, cfg.warmup_iters)
          alpha = (lr_end - lr_start) / cfg.warmup_iters
          lr = cur_epoch * alpha + lr_start
      return lr
  
file_path: pytorchvideo/pytorchvideo_trainer/pytorchvideo_trainer/module/lr_policy.py
imports: import math
  from dataclasses import dataclass
  from typing import Callable, List
  import torch
  from hydra.core.config_store import ConfigStore
  from omegaconf import MISSING
label_desc: Use image node_id 1 for calling a global function with example usage: get_lr_at_epoch(cfg, cur_epoch) and returns: lr