def distance_to_similarity(x, y, dist_func):
    """
    Convert the distance functions in scipy.spatial.distance into similarity functions

    Parameters
    ----------
    x : array_like, Shape(N,)
        First input vector.
    y : array_like, Shape(N,)
        Second input vector.

    dist_func : collable
        collabel distance function (e.g., any distance function in scipy.spatial.distance)

    Returns
    -------
    similarity between x and y.

    """
    return 1 - dist_func(x, y)
