code: def test_orion_configspace_kwargs():
      space = Space()
  
      # NB: scipy uniform [loc, scale], configspace [min, max] with max = loc + scale, loc = min
      def uniform(type, name, low, high, **kwargs):
          return type(
              name, "uniform", loc=low, scale=high - low, **kwargs
          )
  
      space.register(Integer("r2i", "reciprocal", a=1, b=6))
      space.register(uniform(Integer, "u1i", -3, 6))
      space.register(uniform(Integer, "u2i", -3, 6))
      space.register(uniform(Integer, "u4i", -4, 0, default_value=-1))
      space.register(uniform(Integer, "u3i", -3, 6, default_value=2))
  
      space.register(Real("r1f", "reciprocal", a=1, b=6))
      space.register(uniform(Real, "u1f", -3, 6))
      space.register(uniform(Real, "u2f", -3, 6))
      space.register(uniform(Real, "u4f", -4, 0, default_value=-0.2))
      space.register(uniform(Real, "name.u2f", -3, 6))
  
      space.register(Categorical("c1", categories=("asdfa", 2)))
      space.register(Categorical("c2", categories=dict(a=0.2, b=0.8)))
      space.register(Fidelity("f1", low=1, high=9, base=3))
  
      space.register(
          Real("n1", "norm", loc=0.9, scale=0.1, precision=6)
      )
      space.register(
          Real("n2", "norm", loc=0.9, scale=0.1, precision=None)
      )
      space.register(Real("n3", "norm", loc=0.9, scale=0.1))
      space.register(Integer("n4", "norm", loc=1, scale=2))
  
      newspace = to_configspace(space)
      r1 = to_orionspace(newspace)
  
      newspace = to_configspace(r1)
      r2 = to_orionspace(newspace)
  
      # the first roundtrip conversion converted kwargs to positional arguments
      # second roundtrip should be exactly the same
      compare_spaces(r1, r2)
  
      for k, original in space.items():
          dim1 = r1.get(k)
          dim2 = r2.get(k)
  
          print(f"- {k:>10}", original)
          print(" " * 12, dim1)
          print(" " * 12, dim2)
          print()
  
file_path: orion/tests/unittests/algo/test_configspace.py
imports: import pytest
  from orion.algo.space import Categorical, Fidelity, Integer, Real, Space, to_orionspace
  from orion.algo.space.configspace import IMPORT_ERROR, UnsupportedPrior, to_configspace
label_desc: Use image node_id 3 for calling a global function with example usage: test_orion_configspace_kwargs() and returns: type