class_docstr: Implementation that contains the main Bayesian optimization loop.
  
  Parameters
  ----------
  scenario : Scenario
      The scenario object, holding all environmental information.
  runner : AbstractRunner
      The runner (containing the target function) is called internally to judge a trial's performance.
  runhistory : Runhistory
      The runhistory stores all trials.
  intensifier : AbstractIntensifier
      The intensifier decides which trial (combination of configuration, seed, budget and instance) should be run
      next.
  overwrite: bool, defaults to False
      When True, overwrites the run results if a previous run is found that is
      inconsistent in the meta data with the current setup. If ``overwrite`` is set to False, the user is asked
      for the exact behaviour (overwrite completely, save old run, or use old results).
  
  Warning
  -------
  This model should be initialized by a facade only.
class_docstr_tok: ["Implementation","that","contains","the","main","Bayesian","optimization","loop",".","Parameters","--","--","--","--","--","scenario",":","Scenario","The","scenario","object",",","holding","all","environmental","information",".","runner",":","AbstractRunner","The","runner","(","containing","the","target","function",")","is","called","internally","to","judge","a","trial","'s","performance",".","runhistory",":","Runhistory","The","runhistory","stores","all","trials",".","intensifier",":","AbstractIntensifier","The","intensifier","decides","which","trial","(","combination","of","configuration",",","seed",",","budget","and","instance",")","should","be","run","next",".","overwrite",":","bool",",","defaults","to","False","When","True",",","overwrites","the","run","results","if","a","previous","run","is","found","that","is","inconsistent","in","the","meta","data","with","the","current","setup",".","If","``","overwrite","``","is","set","to","False",",","the","user","is","asked","for","the","exact","behaviour","(","overwrite","completely",",","save","old","run",",","or","use","old","results",")",".","Warning","--","--","--","-","This","model","should","be","initialized","by","a","facade","only","."]
code: def __init__(
      self,
      scenario: Scenario,
      runner: AbstractRunner,
      runhistory: RunHistory,
      intensifier: AbstractIntensifier,
      overwrite: bool = False,
  ):
      self._scenario = scenario
      self._configspace = scenario.configspace
      self._runhistory = runhistory
      self._intensifier = intensifier
      self._trial_generator = iter(intensifier)
      self._runner = runner
      self._overwrite = overwrite
  
      # Internal variables
      self._finished = False
      self._stop = False  # Gracefully stop SMAC
      self._callbacks: list[Callback] = []
  
      # Stats variables
      self._start_time: float | None = None
      self._used_target_function_walltime = 0.0
  
      # Set walltime used method for intensifier
      self._intensifier.used_walltime = lambda: self.used_walltime  # type: ignore
  
      # We initialize the state based on previous data.
      # If no previous data is found then we take care of the initial design.
      self._initialize_state()
  
imports: from __future__ import annotations
  from typing import Any
  import json
  import time
  from pathlib import Path
  import numpy
  from ConfigSpace import Configuration
  from numpy import ndarray
  from smac.acquisition.function.abstract_acquisition_function import AbstractAcquisitionFunction
  from smac.callback.callback import Callback
  from smac.intensifier.abstract_intensifier import AbstractIntensifier
  from smac.model.abstract_model import AbstractModel
  from smac.runhistory import StatusType, TrialInfo, TrialValue
  from smac.runhistory.runhistory import RunHistory
  from smac.runner import FirstRunCrashedException
  from smac.runner.abstract_runner import AbstractRunner
  from smac.runner.dask_runner import DaskParallelRunner
  from smac.scenario import Scenario
  from smac.utils.data_structures import recursively_compare_dicts
  from smac.utils.logging import get_logger
label_desc: Use image node_id 1 to create a new SMBO object  with example: obj = SMBO(scenario, runner, runhistory, intensifier, overwrite)