class_docstr: Utility to capture returned values from Optuna's suggest_ methods.
  
  This will wrap around the ``optuna.Trial` object and decorate all
  `suggest_` callables with a function capturing the returned value,
  which will be saved in the ``captured_values`` dict.
class_docstr_tok: ["Utility","to","capture","returned","values","from","Optuna","'s","suggest_","methods",".","This","will","wrap","around","the","``","optuna.Trial","`","object","and","decorate","all","`","suggest_","`","callables","with","a","function","capturing","the","returned","value",",","which","will","be","saved","in","the","``","captured_values","``","dict","."]
code: def __init__(self, ot_trial: OptunaTrial) -> None:
      self.ot_trial = ot_trial
      self.captured_values: Dict[str, Any] = {}
  
imports: import time
  import logging
  import pickle
  import functools
  import warnings
  from packaging import version
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  from ray.air.constants import TRAINING_ITERATION
  from ray.tune.result import DEFAULT_METRIC
  from ray.tune.search.sample import Categorical, Domain, Float, Integer, LogUniform, Quantized, Uniform
  from ray.tune.search import UNRESOLVED_SEARCH_SPACE, UNDEFINED_METRIC_MODE, UNDEFINED_SEARCH_SPACE, Searcher
  from ray.tune.search.variant_generator import parse_spec_vars
  from ray.tune.utils.util import flatten_dict, unflatten_dict, validate_warmstart
label_desc: Use image node_id 1 to create a new _OptunaTrialSuggestCaptor object  with example: obj = _OptunaTrialSuggestCaptor(ot_trial)