class_docstr: Early stop the experiment when a metric plateaued across trials.
  
  Stops the entire experiment when the metric has plateaued
  for more than the given amount of iterations specified in
  the patience parameter.
  
  Args:
      metric: The metric to be monitored.
      std: The minimal standard deviation after which
          the tuning process has to stop.
      top: The number of best models to consider.
      mode: The mode to select the top results.
          Can either be "min" or "max".
      patience: Number of epochs to wait for
          a change in the top models.
  
  Raises:
      ValueError: If the mode parameter is not "min" nor "max".
      ValueError: If the top parameter is not an integer
          greater than 1.
      ValueError: If the standard deviation parameter is not
          a strictly positive float.
      ValueError: If the patience parameter is not
          a strictly positive integer.
docstr: Return a boolean representing if the tuning has to stop.
docstr_tok: ["Return","a","boolean","representing","if","the","tuning","has","to","stop","."]
code: def __call__(self, trial_id, result):
      """Return a boolean representing if the tuning has to stop."""
      self._top_values.append(result[self._metric])
      if self._mode == "min":
          self._top_values = sorted(self._top_values)[: self._top]
      else:
          self._top_values = sorted(self._top_values)[-self._top :]
  
      # If the current iteration has to stop
      if self.has_plateaued():
          # we increment the total counter of iterations
          self._iterations += 1
      else:
          # otherwise we reset the counter
          self._iterations = 0
  
      # and then call the method that re-executes
      # the checks, including the iterations.
      return self.stop_all()
  
file_path: ray/python/ray/tune/stopper/experiment_plateau.py
imports: import numpy
  from ray.util.annotations import PublicAPI
  from ray.tune.stopper.stopper import Stopper
label_desc: Use image node_id 2 for calling the ExperimentPlateauStopper obj's underlying member method code with example usage: obj.__call__(trial_id, result) and returns: self