code: def test_dimensionality(self):
      space = [
          {
              "name": "var_1",
              "type": "continuous",
              "domain": (-3, 1),
              "dimensionality": 2,
          },
          {"name": "var_2", "type": "discrete", "domain": (0, 1, 2, 3)},
          {"name": "var_3", "type": "categorical", "domain": (2, 4)},
      ]
  
      design_space = Design_space(space)
  
      self.assertEqual(
          len(design_space.space_expanded), design_space.dimensionality
      )
  
      space = [
          {
              "name": "var_1",
              "type": "bandit",
              "domain": np.array([[-2, 2], [0, 1], [2, 3]]),
          }
      ]
  
      design_space = Design_space(space)
  
      self.assertEqual(len(design_space.space_expanded), 1)
      self.assertEqual(design_space.dimensionality, 2)
  
imports: import numpy
  import unittest
  from GPyOpt.core.task.space import Design_space
  from GPyOpt.core.task.variables import BanditVariable, DiscreteVariable, CategoricalVariable, ContinuousVariable
  from GPyOpt.core.errors import InvalidConfigError
label_desc: Use image node_id 9 for calling the TestDesignSpace obj's underlying member method code with example usage: obj.test_dimensionality() without return types