code: def configure_constant_scheduler(
      optimizer: Optimizer, last_epoch: int = -1
  ):
      """
      Return a scheduler with a constant learning rate, using the learning rate set in optimizer.
  
      Args:
          optimizer (`Optimizer`):
              The optimizer for which to schedule the learning rate.
          last_epoch (`int`):
              The last epoch when resuming training.
  
      Return (`LambdaLR`):
          A constant scheduler
  
      Example:
          >>> from towhee.trainer.scheduler import configure_constant_scheduler
          >>> from towhee.trainer.optimization.adamw import AdamW
          >>> from torch import nn
          >>> def unwrap_scheduler(scheduler, num_steps=10):
          >>>     lr_sch = []
          >>>     for _ in range(num_steps):
          >>>         lr_sch.append(scheduler.get_lr()[0])
          >>>         scheduler.step()
          >>>     return lr_sch
          >>> mdl = nn.Linear(50, 50)
          >>> optimizer = AdamW(mdl.parameters(), lr=10.0)
          >>> num_steps = 2
          >>> scheduler = configure_constant_scheduler(optimizer)
          >>> lr_sch_1 = unwrap_scheduler(scheduler, num_steps)
          [10.0, 10.0]
      """
      return LambdaLR(optimizer, lambda _: 1, last_epoch=last_epoch)
  
file_path: towhee/towhee/trainer/scheduler.py
imports: import math
  from torch.optim.lr_scheduler import LambdaLR
  from torch.optim.optimizer import Optimizer
label_desc: Use image node_id 2 for calling a global function with example usage: configure_constant_scheduler(optimizer, last_epoch) and returns: LambdaLR