code: def learning_rate(self, epoch):
      if (
          self.other_lr_schedule is None
          or self.other_lr_schedule.get("type") is None
      ):
          lr = self.init_lr
          for reduce_lr_epoch, reduce_factor in zip(
              self.reduce_lr_epochs, self.reduce_lr_factors
          ):
              if epoch >= reduce_lr_epoch * self.n_epochs:
                  lr /= reduce_factor
      else:
          if self.other_lr_schedule["type"] == "cosine":
              lr_max = self.init_lr
              lr_min = self.other_lr_schedule.get("lr_min", 0)
              lr = lr_min + 0.5 * (lr_max - lr_min) * (
                  1 + np.cos((epoch - 1) / self.n_epochs * np.pi)
              )
          else:
              raise ValueError(
                  "Do not support %s" % self.other_lr_schedule["type"]
              )
      return lr
  
file_path: auptimizer/src/aup/Proposer/eas/models/utils.py
imports: from .dense_net import DenseNetConfig, DenseNet
  from .convnet import SimpleConvnetConfig, SimpleConvnet
  import numpy
label_desc: Use image node_id 5 for calling the RunConfig obj's underlying member method code with example usage: obj.learning_rate(epoch) and returns: lr