code: def test_ask_and_tell(make_facade):
      """Tests whether ask followed by a tell works."""
      model, smac = make_facade(deterministic=False, use_instances=True)
  
      for _ in range(smac._scenario.n_trials):
          trial_info = smac.ask()
  
          cost = model.train(
              trial_info.config,
              seed=trial_info.seed,
              instance=trial_info.instance,
          )
          trial_value = TrialValue(cost=cost, time=0.5)
  
          smac.tell(trial_info, trial_value)
  
      assert smac.intensifier.get_incumbent() == smac.optimize()
  
file_path: SMAC3/tests/test_ask_and_tell/test_ask_and_tell_successive_halving.py
imports: from __future__ import annotations
  import pytest
  from smac import MultiFidelityFacade, Scenario
  from smac.runhistory.dataclasses import TrialInfo, TrialValue
label_desc: Use image node_id 4 for calling a global function with example usage: test_ask_and_tell(make_facade) without return types