code: def orion_space_to_axoptimizer_space(orion_space):
      """Convert Orion's definition of problem's domain to an axoptimizer
      compatible one."""
      axoptimizer_space = []
  
      for dimension in orion_space.values():
          if dimension.type == "fidelity":
              continue
  
          dimensions_dict = {}
          dimensions_dict["name"] = dimension.name
  
          dimensions_dict["type"] = "range"
          # Convert 0-dim arrays into python numbers so their type can be
          # validated by Ax
          dimensions_dict["bounds"] = [
              float(i) for i in dimension.interval()
          ]
  
          if dimension.prior_name in "uniform":
              dimensions_dict["value_type"] = "float"
              dimensions_dict["log_scale"] = False
  
          elif dimension.prior_name == "reciprocal":
              dimensions_dict["value_type"] = "float"
              dimensions_dict["log_scale"] = True
  
          elif dimension.prior_name in ["int_uniform", "choices"]:
              dimensions_dict["value_type"] = "int"
              dimensions_dict["log_scale"] = False
  
          elif dimension.prior_name == "int_reciprocal":
              dimensions_dict["value_type"] = "int"
              dimensions_dict["log_scale"] = True
  
          else:
              raise TypeError(
                  "Ax only supports `uniform`, `reciprocal`, `int_uniform`, "
                  f"`int_reciprocal` and `choices`: `{dimension.prior_name}`"
              )
  
          axoptimizer_space.append(dimensions_dict)
  
      return axoptimizer_space
  
imports: import contextlib
  import copy
  from typing import List, Optional
  from orion.algo.base import BaseAlgorithm
  from orion.algo.space import Fidelity, Space
  from orion.core.utils import format_trials
  from orion.core.utils.flatten import flatten
  from orion.core.utils.module_import import ImportOptional
  from orion.core.worker.transformer import TransformedDimension
label_desc: Use image node_id 1 for calling a global function with example usage: orion_space_to_axoptimizer_space(orion_space) and returns: axoptimizer_space