code: def _suggest(self, trial: optuna.trial.Trial) -> Suggestion:
      suggestions: Suggestion = dict()
      for name, config in self.api_config.items():
          low, high = config["range"]
          log = config["space"] == "log"
  
          if config["space"] == "logit":
              assert 0 < low <= high < 1
              low = np.log(low / (1 - low))
              high = np.log(high / (1 - high))
  
          if config["type"] == "real":
              param = trial.suggest_float(name, low, high, log=log)
  
          elif config["type"] == "int":
              param = trial.suggest_int(name, low, high, log=log)
  
          else:
              # TODO(xadrianzetx) Support `suggest_categorical` if benchmark is extended.
              raise RuntimeError(
                  "CategoricalDistribution is not supported in bayesmark."
              )
  
          suggestions[name] = (
              param
              if config["space"] != "logit"
              else 1 / (1 + np.exp(-param))
          )
  
      return suggestions
  
file_path: optuna/benchmarks/bayesmark/optuna_optimizer.py
imports: from __future__ import annotations
  from typing import Any
  from typing import Dict
  from typing import Union
  import numpy
  from bayesmark.abstract_optimizer import AbstractOptimizer
  from bayesmark.experiment import experiment_main
  import optuna
  from optuna import pruners
  from optuna import samplers
  from optuna.integration.botorch import BoTorchSampler
  from optuna.integration.cma import PyCmaSampler
label_desc: Use image node_id 2 for calling the OptunaOptimizer obj's underlying member method code with example usage: obj._suggest(trial) and returns: suggestions