code: def callback(
      smbo: SMBO,
      run_info: RunInfo,
      result: RunValue,
      time_left: float,
  ) -> bool | None:
      """Stop early if we get a very low cost value for a single run
  
      The return value indicates to SMAC whether to stop or not. False will
      stop the search process while any other value will mean it continues.
      """
      # You can find out the parameters in the SMAC documentation
      # https://automl.github.io/SMAC3/main/
      if result.cost <= 0.02:
          print("Stopping!")
          print(run_info)
          print(result)
          return False
  
file_path: auto-sklearn/examples/40_advanced/example_early_stopping_and_callbacks.py
imports: from __future__ import annotations
  from pprint import pprint
  import sklearn.datasets
  import sklearn.metrics
  import autosklearn.classification
  from smac.optimizer.smbo import SMBO
  from smac.runhistory.runhistory import RunInfo, RunValue
label_desc: Use image node_id 1 for calling a global function with example usage: callback(smbo, run_info, result, time_left) and returns: False