code: def on_train_begin(self, **kwargs:Any)->None:
          "Initializes the best value."
          self.best = float('inf') if self.operator == np.less else -float('inf'f on_train_begin(self, **kwargs:Any)->None:
          "Initializes the best value."
          self.best = float('inf') if self.operator == np.less else -float('inf')
docs: Initializes the best value.