def METHOD_NAME(x, y, s, kernel):
    sq = squared_distances(x, y)
    if kernel == "gaussian":
        return np.exp(-sq / (s * s))
    elif kernel == "laplacian":
        return np.exp(-np.sqrt(sq) / s)
    elif kernel == "cauchy":
        return 1.0 / (1 + sq / (s * s))
    elif kernel == "inverse_multiquadric":
        return np.sqrt(1.0 / (1 + sq / (s * s)))