def paired_distances(X, Y, metric="euclidean", **kwds):

    if metric in PAIRED_DISTANCES:
        func = PAIRED_DISTANCES[metric]
        return func(X, Y)
    elif callable(metric):
        # Check the matrix first (it is usually done by the metric)
        X, Y = check_paired_arrays(X, Y)
        distances = np.zeros(len(X))
        for i in range(len(X)):
            distances[i] = metric(X[i], Y[i])
        return distances
    else:
        raise ValueError('Unknown distance %s' % metric)


# Kernels
Computes the paired distances between X and Y.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/metrics/pairwise.py/paired_distances