def snap_to_nearest_config(x, tune_params):
    """helper func that for each param selects the closest actual value"""
    params = []
    for i, k in enumerate(tune_params.keys()):
        values = numpy.array(tune_params[k])
        idx = numpy.abs(values-x[i]).argmin()
        params.append(int(values[idx]))
    return params
helper func that for each param selects the closest actual value