code: def test_space_from_yaml():
      with NamedTemporaryFile(delete=False) as tmp:
          tmp.write(
              b"""
          Space:
              - Real:
                  low: 0.0
                  high: 1.0
              - Integer:
                  low: -5
                  high: 5
              - Categorical:
                  categories:
                  - a
                  - b
                  - c
              - Real:
                  low: 1.0
                  high: 5.0
                  prior: log-uniform
              - Categorical:
                  categories:
                  - e
                  - f
          """
          )
          tmp.flush()
  
          space = Space(
              [
                  (0.0, 1.0),
                  (-5, 5),
                  ("a", "b", "c"),
                  (1.0, 5.0, "log-uniform"),
                  ("e", "f"),
              ]
          )
  
          space2 = Space.from_yaml(tmp.name)
          assert_equal(space, space2)
          tmp.close()
          os.unlink(tmp.name)
  
imports: import pytest
  import numbers
  import numpy
  import os
  import yaml
  from tempfile import NamedTemporaryFile
  from numpy.testing import assert_array_almost_equal
  from numpy.testing import assert_array_equal
  from numpy.testing import assert_equal
  from numpy.testing import assert_raises_regex
  from skopt import Optimizer
  from skopt.space import Space
  from skopt.space import Real
  from skopt.space import Integer
  from skopt.space import Categorical
  from skopt.space import check_dimension
  from skopt.utils import normalize_dimensions
label_desc: Use image node_id 37 for calling a global function with example usage: test_space_from_yaml() without return types