def METHOD_NAME(self, num_updates):
    """
    Update the learning rate after each update."""
    # if there is warmup
    if self.cfg.warmup_updates > 0:
        if num_updates <= self.cfg.warmup_updates:
            self.lr = self.cfg.warmup_init_lr + num_updates * self.lr_step
            self.optimizer.set_lr(self.lr)
        else:
            if self.warmup_end is False:
                self.warmup_end = True
    # else do nothing
    return self.optimizer.get_lr()