def get_suggestion(param: Any, index: int, values: dict[str, Any]) -> tuple[int, tuple[int, Any]]:
        """Recursively, compute the values for the input param based on the index.

        Each entry is a tuple of the index in the list of suggestions for that param and the corresponding choice.
        """
        length = SearchSpace.get_param_length(param)

        if index < length:
            if isinstance(param, SearchParameter):
                suggestions = SearchSpace.get_param_suggestions(param, values)

                for i, suggestion in enumerate(suggestions):
                    if isinstance(suggestion, (SearchParameter, SearchSpace)):
                        suggestion_length = SearchSpace.get_param_length(suggestion)
                        if index < suggestion_length:
                            _, (_, i_suggestion) = SearchSpace.get_suggestion(suggestion, index, values)
                            return 0, (i, i_suggestion)
                        else:
                            index -= suggestion_length
                    elif index > 0:
                        index -= 1
                    else:
                        return 0, (i, suggestion)

            elif isinstance(param, SearchSpace):
                return 0, (index, param.get_sample_point_values(index))

            else:
                return index, param

        _, suggestion = SearchSpace.get_suggestion(param, index % length, values)
        return index // length, suggestion
Recursively, compute the values for the input param based on the index.

        Each entry is a tuple of the index in the list of suggestions for that param and the corresponding choice.
        
olive/search/search_space.py