code: def new_evaluation_result(self, has_improved: bool) -> bool:
          
          if self.lr is None:
              assert self.base_lr is not None
              self.lr = self.base_lr
          if has_improved:
              self.num_not_improved = 0
          else:
              self.num_not_improved += 1
              if self.num_not_improved >= self.reduce_num_not_improved and self.reduce_factor < 1.0 and self.warmed_up:
                  old_lr = self.lr
                  self.lr *= self.reduce_factor
                  logger.info("%d checkpoints since improvement or rate scaling, "
                              "lowering learning rate: %1.2e -> %1.2e", self.num_not_improved, old_lr, self.lr)
                  self.num_not_improved = 0
                  return True
          return False
docs: Returns true if the parameters should be reset to the ones with the best validation score.
  
          :param has_improved: Whether the model improved on held-out validation data.
          :return: True if parameters should be reset to the ones with best validation score.