code: def test_simple(algorithm: dict):
      """Test a simple usage scenario."""
      max_trials = 30
      exp = workon(
          rosenbrock, space, algorithm=algorithm, max_trials=max_trials
      )
  
      assert exp.max_trials == max_trials
      assert exp.configuration["algorithm"] == algorithm
  
      trials = exp.fetch_trials()
      assert len(trials) == max_trials
      assert trials[-1].status == "completed"
  
      assert all(trial.objective is not None for trial in trials)
      best_trial = min(trials, key=lambda trial: trial.objective.value)
      assert best_trial.objective.name == "objective"
      assert abs(best_trial.objective.value - 23.4) < 15
      assert len(best_trial.params) == 1
      param = best_trial._params[0]
      assert param.name == "x"
      assert param.type == "real"
  
imports: from __future__ import annotations
  import copy
  import os
  from pathlib import Path
  import numpy
  import pytest
  from orion.algo.pbt.pb2_utils import import_optional
  from orion.client import build_experiment, create_experiment, workon
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.utils.module_import import ImportOptional
  from orion.core.worker.algo_wrappers import AlgoWrapper
  from orion.core.worker.primary_algo import SpaceTransform
  from orion.core.worker.trial import Trial
  from orion.storage.base import BaseStorageProtocol
  from orion.benchmark.task.base import BenchmarkTask
label_desc: Use image node_id 5 for calling a global function with example usage: test_simple(algorithm) without return types