class_docstr: Stops all trials after a certain timeout.
  
  This stopper is automatically created when the `time_budget_s`
  argument is passed to `train.RunConfig()`.
  
  Args:
      timeout: Either a number specifying the timeout in seconds, or
          a `datetime.timedelta` object.
code: def stop_all(self):
      now = time.time()
  
      if self._last_check:
          taken = now - self._last_check
          self._budget -= taken
  
      self._last_check = now
  
      if self._budget <= 0:
          logger.info(
              f"Reached timeout of {self._timeout_seconds} seconds. "
              f"Stopping all trials."
          )
          return True
  
      return False
  
file_path: ray/python/ray/tune/stopper/timeout.py
imports: import datetime
  from typing import Union
  import time
  from ray import logger
  from ray.util.annotations import PublicAPI
  from ray.tune.stopper.stopper import Stopper
label_desc: Use image node_id 3 for calling the TimeoutStopper obj's underlying member method code with example usage: obj.stop_all() and returns: False, True