code: def test_space_eval():
      space = hp.choice(
          "a",
          [
              ("case 1", 1 + hp.lognormal("c1", 0, 1)),
              ("case 2", hp.uniform("c2", -10, 10)),
          ],
      )
  
      assert space_eval(space, {"a": 0, "c1": 1.0}) == ("case 1", 2.0)
      assert space_eval(space, {"a": 1, "c2": 3.5}) == ("case 2", 3.5)
  
imports: import unittest
  import numpy
  from timeit import default_timer
  import time
  from hyperopt.early_stop import no_progress_loss
  from hyperopt.fmin import generate_trials_to_calculate
  import pytest
  from hyperopt import fmin, rand, tpe, hp, Trials, exceptions, space_eval, STATUS_FAIL, STATUS_OK
  from hyperopt.base import JOB_STATE_ERROR
label_desc: Use image node_id 5 for calling a global function with example usage: test_space_eval() without return types