code: def test_space_names_in_use_named_args():
      space = [Integer(250, 2000, name="n_estimators")]
  
      @use_named_args(space)
      def objective(n_estimators):
          return n_estimators
  
      res = gp_minimize(objective, space, n_calls=10, random_state=0)
      best_params = dict(zip((s.name for s in res.space), res.x))
      assert "n_estimators" in best_params
      assert res.space.dimensions[0].name == "n_estimators"
  
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 14 for calling a global function with example usage: test_space_names_in_use_named_args() and returns: n_estimators