code: def compare_spaces(s1, s2):
      for k, original in s1.items():
          # ConfigSpace does not have a fidelity dimension
          # or the alpha prior
          if k in ("f1", "a1i"):
              continue
  
          converted = s2[k]
  
          # Orion space did not have default values
          # but ConfigSpace always set them
          if not original.default_value:
              converted._default_value = None
  
          assert type(original) == type(converted)
          assert original == converted
  
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 1 for calling a global function with example usage: compare_spaces(s1, s2) without return types