code: def test_check_dimension_names():
      # Define the search-space dimensions. They must all have names!
      dim1 = Real(name="foo", low=0.0, high=1.0)
      dim2 = Real(name="bar", low=0.0, high=1.0)
      dim3 = Real(name="baz", low=0.0, high=1.0)
  
      # Gather the search-space dimensions in a list.
      dimensions = [dim1, dim2, dim3]
      check_dimension_names(dimensions)
      dimensions = [dim1, dim2, dim3, Real(-1, 1)]
      assert_raises(ValueError, check_dimension_names, dimensions)
  
imports: import pytest
  import tempfile
  from numpy.testing import assert_array_equal
  from numpy.testing import assert_equal
  from numpy.testing import assert_raises
  import numpy
  from skopt import gp_minimize, forest_minimize
  from skopt import load
  from skopt import dump
  from skopt import expected_minimum, expected_minimum_random_sampling
  from skopt.benchmarks import bench1
  from skopt.benchmarks import bench3
  from skopt.learning import ExtraTreesRegressor
  from skopt import Optimizer
  from skopt import Space
  from skopt.space import Dimension
  from skopt.utils import point_asdict
  from skopt.utils import point_aslist
  from skopt.utils import dimensions_aslist
  from skopt.utils import has_gradients
  from skopt.utils import cook_estimator
  from skopt.utils import normalize_dimensions
  from skopt.utils import use_named_args
  from skopt.utils import check_list_types
  from skopt.utils import check_dimension_names
  from skopt.space import Real, Integer, Categorical
label_desc: Use image node_id 15 for calling a global function with example usage: test_check_dimension_names() without return types