code: def __init__(
      self,
      parametrization: IntOrParameter,
      budget: tp.Optional[int] = None,
      num_workers: int = 1,
      *,
      prior_weight: float = 1.0,
      n_startup_jobs: int = 20,
      n_EI_candidates: int = 24,
      gamma: float = 0.25,
      verbose: bool = False,
  ) -> None:
      super().__init__(
          parametrization, budget=budget, num_workers=num_workers
      )
      try:
          # try to convert parametrization to hyperopt search space
          if not isinstance(self.parametrization, p.Instrumentation):
              raise NotImplementedError
          self.space = _get_search_space(
              self.parametrization.name, self.parametrization
          )
          self._transform = None
      except NotImplementedError:
          self._transform = transforms.ArctanBound(0, 1)
          self.space = {
              f"x_{i}": hp.uniform(f"x_{i}", 0, 1)
              for i in range(self.dimension)
          }
  
      self.trials = Trials()
      self.domain = Domain(
          fn=None, expr=self.space, pass_expr_memo_ctrl=False
      )
      self.tpe_args = {
          "prior_weight": prior_weight,
          "n_startup_jobs": n_startup_jobs,
          "n_EI_candidates": n_EI_candidates,
          "gamma": gamma,
          "verbose": verbose,
      }
  
imports: import numpy
  from .None import base
  from .base import IntOrParameter
  import nevergrad.common.typing
  from nevergrad.parametrization import transforms
  from nevergrad.parametrization import parameter
  import hyperopt
  from hyperopt import hp, Trials, Domain, tpe
label_desc: Use image node_id 1 to create a new _HyperOpt object from inherited base classes: base with example: obj = _HyperOpt(parametrization, budget, num_workers)