def METHOD_NAME(self, trial: Trial):
    """
    Extract current value of hyperparameter from an optuna Trial.
    Parameters
    ----------
    trial : optuna.trial.Trial
        Optuna trial, from which the hyperparameter value should be
        extracted.
    Returns
    -------
    return_value : float, int or string
        Return value is based on type of hyperparameter.
    """
    if self.opttype == "float":
        return self.get_float(trial)
    if self.opttype == "int":
        return self.get_int(trial)
    if self.opttype == "categorical":
        return self.get_categorical(trial)
    raise Exception("Wrong hyperparameter type.")