def METHOD_NAME(self, trial: Trial):
    """
    Extract integer hyperparameter from an optuna Trial.
    Parameters
    ----------
    trial : optuna.trial.Trial
        Optuna trial, from which the hyperparameter value should be
        extracted.
    Returns
    -------
    return_value : int
        Return value is based on type of hyperparameter.
    """
    if self.opttype == "int":
        return trial.suggest_int(self.name, self.low, self.high)
    else:
        raise Exception("Wrong hyperparameter type.")