code: def make_facade(
      digits_dataset, make_sgd
  ) -> HyperparameterOptimizationFacade:
      def create(
          deterministic: bool = True,
          use_instances: bool = False,
          max_config_calls: int = 5,
      ) -> HyperparameterOptimizationFacade:
          model = make_sgd(digits_dataset)
  
          instances_kwargs = {}
          if use_instances:
              instances_kwargs = {
                  "instances": digits_dataset.get_instances(),
                  "instance_features": digits_dataset.get_instance_features(),
              }
  
          scenario = Scenario(
              model.configspace,
              deterministic=deterministic,
              n_trials=15,  # We want to try max 5000 different configurations
              min_budget=1,  # Use min one instance
              max_budget=45,  # Use max 45 instances (if we have a lot of instances we could constraint it)
              **instances_kwargs,
          )
  
          # Create our SMAC object and pass the scenario and the train method
          smac = HyperparameterOptimizationFacade(
              scenario,
              model.train,
              initial_design=HyperparameterOptimizationFacade.get_initial_design(
                  scenario, n_configs=2, max_ratio=1
              ),
              intensifier=HyperparameterOptimizationFacade.get_intensifier(
                  scenario, max_config_calls=max_config_calls
              ),
              logging_level=0,
              overwrite=True,
          )
  
          return model, smac
  
      return create
  
file_path: SMAC3/tests/test_ask_and_tell/test_ask_and_tell_intensifier.py
imports: from __future__ import annotations
  import pytest
  from smac import HyperparameterOptimizationFacade, Scenario
  from smac.runhistory.dataclasses import TrialInfo, TrialValue
label_desc: Use image node_id 1 for calling a global function with example usage: make_facade(digits_dataset, make_sgd) and returns: create, model,  smac