class_docstr: Adapter for the HEBO algorithm from https://github.com/huawei-noah/HEBO
  
  Parameters
  ----------
  :param space: Optimisation space with priors for each dimension.
  :param seed: Base seed for the random number generators. Defaults to `None`, in which case the
  randomness is not seeded.
  :param parameters: Parameters for the HEBO algorithm.
docstr: Fix any issues with the outputs of the HEBO algo so they fit `self.space`.
docstr_tok: ["Fix","any","issues","with","the","outputs","of","the","HEBO","algo","so","they","fit","`","self.space","`","."]
code: def _hebo_params_to_orion_params(self, hebo_params: dict) -> dict:
      """Fix any issues with the outputs of the HEBO algo so they fit `self.space`."""
      orion_params = {}
      for name, value in hebo_params.items():
          dim: Dimension = self.space[name]
          from orion.core.worker.transformer import ReshapedDimension
  
          if (
              dim.type == "categorical"
              and dim.prior_name == "choices"
              and value not in dim
          ):
              potential_vals = [
                  v for v in dim.interval() if str(v) == value
              ]
              if len(potential_vals) == 1:
                  value = potential_vals[0]
              else:
                  raise RuntimeError(
                      f"Value {value} is not contained in the dimension {dim}, and "
                      f"{len(potential_vals)} could match it."
                  )
          elif isinstance(dim, ReshapedDimension):
              # BUG: https://github.com/Epistimio/orion/issues/800
              if isinstance(value, (int, float)) and not isinstance(
                  value, bool
              ):
                  # note: need to make sure `value` isn't a bool, since issubclass(bool, int).
                  value = np.array(value)
              # assert value in dim  # NOTE: Doesn't work! Raises an issue (index is None + int).
          orion_params[name] = value
  
      if self._params_to_trial(orion_params) not in self.space:
          raise RuntimeError(
              f"Unable to fix all the issues: params {orion_params} still isn't in space "
              f"{self.space}!"
          )
  
      return orion_params
  
imports: from __future__ import annotations
  import copy
  import typing
  import warnings
  from dataclasses import dataclass
  from logging import getLogger
  from typing import Any, ClassVar, Literal
  import numpy
  import pandas
  from typing_extensions import TypedDict
  from orion.algo.base import BaseAlgorithm
  from orion.algo.space import Dimension, Fidelity, Space
  from orion.core.utils.format_trials import dict_to_trial
  from orion.core.utils.module_import import ImportOptional
  from orion.core.utils.random_state import RandomState, control_randomness
  from orion.core.worker.transformer import TransformedDimension
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 7 for calling the HEBO obj's underlying member method code with example usage: obj._hebo_params_to_orion_params(hebo_params) and returns: orion_params