code: def check_dimension(Dimension, vals, random_val):
      x = Dimension(*vals)
      assert_equal(x, Dimension(*vals))
      assert x != Dimension(vals[0], vals[1] + 1)
      assert x != Dimension(vals[0] + 1, vals[1])
      y = x.rvs(random_state=1)
      if isinstance(y, list):
          y = np.array(y)
      assert_equal(y, random_val)
  
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 1 for calling a global function with example usage: check_dimension(Dimension, vals, random_val) without return types