code: def run(self) -> None:
      from smac import (
          BlackBoxFacade,
          HyperparameterOptimizationFacade,
          MultiFidelityFacade,
          Scenario,
          AlgorithmConfigurationFacade,
      )
  
      # Get instances
      instances = None
      instance_features = None
  
      if self.task.use_instances:
          instances = self.task.model.dataset.get_instances()
          instance_features = (
              self.task.model.dataset.get_instance_features()
          )
  
      # Create scenario
      scenario = Scenario(
          self.model.configspace,
          n_trials=self.task.n_trials,
          walltime_limit=self.task.walltime_limit,
          deterministic=self.task.deterministic,
          instances=instances,
          instance_features=instance_features,
          min_budget=self.task.min_budget,
          max_budget=self.task.max_budget,
          n_workers=self.task.n_workers,
          seed=self.seed,
      )
  
      intensifier_kwargs = {}
  
      # Create facade
      if self.task.optimization_type == "bb":
          facade_object = BlackBoxFacade
          intensifier_kwargs[
              "max_config_calls"
          ] = self.task.max_config_calls
      elif self.task.optimization_type == "hpo":
          facade_object = HyperparameterOptimizationFacade
          intensifier_kwargs[
              "max_config_calls"
          ] = self.task.max_config_calls
      elif self.task.optimization_type == "mf":
          facade_object = MultiFidelityFacade
          intensifier_kwargs["n_seeds"] = self.task.n_seeds
          intensifier_kwargs[
              "incumbent_selection"
          ] = self.task.incumbent_selection
      elif self.task.optimization_type == "ac":
          facade_object = AlgorithmConfigurationFacade
          intensifier_kwargs[
              "max_config_calls"
          ] = self.task.max_config_calls
      else:
          raise RuntimeError("Unknown optimization type.")
  
      if self.task.intensifier is None:
          intensifier = facade_object.get_intensifier(
              scenario, **intensifier_kwargs
          )
      else:
          if self.task.intensifier == "successive_halving":
              from smac.intensifier.successive_halving import (
                  SuccessiveHalving,
              )
  
              intensifier = SuccessiveHalving(
                  scenario, **intensifier_kwargs
              )
          else:
              raise RuntimeError("Unsupported intensifier.")
  
      config_selector = facade_object.get_config_selector(
          scenario, retrain_after=self.task.retrain_after
      )
  
      smac = facade_object(
          scenario,
          self.task.model.train,
          intensifier=intensifier,
          config_selector=config_selector,
          logging_level=99999,
          overwrite=True,
      )
      smac.optimize()
  
      self._smac = smac
  
file_path: SMAC3/benchmark/src/wrappers/v20.py
imports: from __future__ import annotations
  from src.tasks.task import Task
  from src.utils.exceptions import NotSupportedError
  from src.wrappers.wrapper import Wrapper
label_desc: Use image node_id 2 for calling the Version20 obj's underlying member method code with example usage: obj.run() without return types