code: def _convert_hyper_parameters_to_optuna(self):
      # type: () -> dict
      cs = {}
      for p in self._hyper_parameters:
          if isinstance(p, LogUniformParameterRange):
              hp_type = "suggest_float"
              hp_params = dict(
                  low=p.base**p.min_value,
                  high=p.base**p.max_value,
                  log=True,
                  step=None,
              )
          elif isinstance(p, UniformParameterRange):
              if p.include_max and p.step_size:
                  hp_type = "suggest_discrete_uniform"
                  hp_params = dict(
                      low=p.min_value, high=p.max_value, q=p.step_size
                  )
              else:
                  hp_type = "suggest_float"
                  hp_params = dict(
                      low=p.min_value,
                      high=p.max_value,
                      log=False,
                      step=p.step_size,
                  )
          elif isinstance(p, UniformIntegerParameterRange):
              hp_type = "suggest_int"
              hp_params = dict(
                  low=p.min_value,
                  high=p.max_value
                  if p.include_max
                  else p.max_value - p.step_size,
                  log=False,
                  step=p.step_size,
              )
          elif isinstance(p, DiscreteParameterRange):
              hp_type = "suggest_categorical"
              hp_params = dict(choices=p.values)
          else:
              raise ValueError(
                  "HyperParameter type {} not supported yet with OptimizerBOHB".format(
                      type(p)
                  )
              )
          cs[p.name] = (hp_type, hp_params)
  
      return cs
  
file_path: clearml/clearml/automation/optuna/optuna.py
imports: from time import sleep
  from typing import Any, Optional, Sequence
  from ..optimization import Objective, SearchStrategy
  from ..parameters import DiscreteParameterRange, Parameter, UniformIntegerParameterRange, UniformParameterRange, LogUniformParameterRange
  from ...task import Task
label_desc: Use image node_id 4 for calling the OptimizerOptuna obj's underlying member method code with example usage: obj._convert_hyper_parameters_to_optuna() and returns: cs