code: def test_tell_without_ask_instances(make_facade):
      """Tests whether tell works without ask. In the case of ``intensifier`` it should work."""
      model, smac = make_facade(deterministic=False, use_instances=True)
      N = 10
      seed = 95
      instance = smac.scenario.instances[0]
  
      # We can provide SMAC with custom configurations first
      for config in model.configspace.sample_configuration(N):
          cost = model.train(config, seed=seed, instance=instance)
  
          trial_info = TrialInfo(config, seed=seed, instance=instance)
          trial_value = TrialValue(cost=cost, time=0.5)
          smac.tell(trial_info, trial_value)
  
          # Instance is not supported
          with pytest.raises(ValueError):
              trial_info = TrialInfo(config, seed=seed, instance=None)
              trial_value = TrialValue(cost=cost, time=0.5)
              smac.tell(trial_info, trial_value)
  
      # We submitted N configurations and finished all of them
      assert smac.runhistory.finished == N
      assert smac.runhistory.submitted == N
  
      smac.optimize()
  
      # After optimization we expect to have +10 finished
      assert smac.runhistory.finished == smac._scenario.n_trials
      assert smac.runhistory.submitted == smac._scenario.n_trials
  
      # We expect SMAC to use the same seed if configs with a seed were passed
      for k in smac.runhistory.keys():
          assert k.seed == 95
  
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 2 for calling a global function with example usage: test_tell_without_ask_instances(make_facade) without return types