def METHOD_NAME(self, request, context):
    """
    Main function to provide suggestion.
    """
    algorithm_name, config = OptimizerConfiguration.convert_algorithm_spec(
        request.experiment.spec.algorithm)
    if self.is_first_run:
        search_space = HyperParameterSearchSpace.convert(request.experiment)
        self.base_service = BaseSkoptService(
            base_estimator=config.base_estimator,
            n_initial_points=config.n_initial_points,
            acq_func=config.acq_func,
            acq_optimizer=config.acq_optimizer,
            random_state=config.random_state,
            search_space=search_space)
        self.is_first_run = False
    trials = Trial.convert(request.trials)
    new_trials = self.base_service.getSuggestions(trials, request.current_request_number)
    return api_pb2.GetSuggestionsReply(
        parameter_assignments=Assignment.generate(new_trials)
    )