class_docstr: Cosine annealing with restarts learning rate scheme.
  
  Args:
      periods (list[int]): Periods for each cosine anneling cycle.
      restart_weights (list[float], optional): Restart weights at each
          restart iteration. Default: [1].
      min_lr (float, optional): The minimum lr. Default: None.
      min_lr_ratio (float, optional): The ratio of minimum lr to the base lr.
          Either `min_lr` or `min_lr_ratio` should be specified.
          Default: None.
code: def get_lr(self, runner, base_lr):
      if self.by_epoch:
          progress = runner.epoch
      else:
          progress = runner.iter
  
      if self.min_lr_ratio is not None:
          target_lr = base_lr * self.min_lr_ratio
      else:
          target_lr = self.min_lr
  
      idx = get_position_from_periods(progress, self.cumulative_periods)
      current_weight = self.restart_weights[idx]
      nearest_restart = (
          0 if idx == 0 else self.cumulative_periods[idx - 1]
      )
      current_periods = self.periods[idx]
  
      alpha = min((progress - nearest_restart) / current_periods, 1)
      return annealing_cos(base_lr, target_lr, alpha, current_weight)
  
imports: import numbers
  from math import cos, pi
  import annotator.uniformer.mmcv
  from .hook import HOOKS, Hook
label_desc: Use image node_id 2 for calling the CosineRestartLrUpdaterHook obj's underlying member method code with example usage: obj.get_lr(runner, base_lr) and returns: annealing_cos