code: def test_round_optimum_categorical(self):
      space = [
          {
              "name": "var1",
              "type": "categorical",
              "domain": (0, 1, 2, 3),
              "dimensionality": 1,
          }
      ]
      test_cases = [
          {"in": [[1, 0, 0, 0]], "out": [[1, 0, 0, 0]]},
          {"in": [[1, 0, 1, 0]], "out": [[1, 0, 0, 0]]},
          {"in": [[1, 2, 3, 1]], "out": [[0, 0, 1, 0]]},
          {"in": [[-1, -2, -3, 0]], "out": [[0, 0, 0, 1]]},
      ]
      self.assert_round_optimum(space, test_cases)
  
      space = [
          {
              "name": "var1",
              "type": "categorical",
              "domain": (0, 1, 2, 3),
              "dimensionality": 2,
          }
      ]
      test_cases = [
          {
              "in": [[1, 0, 0, 0, 1, 1, 1, 1]],
              "out": [[1, 0, 0, 0, 1, 0, 0, 0]],
          }
      ]
      self.assert_round_optimum(space, test_cases)
  
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 23 for calling the TestDesignSpace obj's underlying member method code with example usage: obj.test_round_optimum_categorical() without return types