def METHOD_NAME(locations_1, locations_2, sigma_um, p, distance_metric="euclidean"):
    """
    Get the kriging kernel between two sets of locations.
    Parameters
    ----------
    locations_1 / locations_2 : 2D np.array
        Locations of shape (N, D) where N is number of
        channels and d is spatial dimension (e.g. 2 for [x, y])
    sigma_um : float or list
        Scale paremter on  the Gaussian kernel,
        typically distance between contacts in micrometers.
        In case sigma_um is list then this mimics the Kilosort2.5 behavior, which uses two separate sigmas for each dimension.
        In the later case the metric is always a 'cityblock'
    p : float
        Weight parameter on the exponential function. Default
        in IBL kriging interpolation is 1.3.
    Results
    ----------
    kernal_dist : n x m array (i.e. locations 1 x locations 2) of
                  distances (gaussian kernel) between locations 1 and 2.
    """
    if np.isscalar(sigma_um):
        import scipy
        dist = scipy.spatial.distance.cdist(locations_1, locations_2, metric=distance_metric)
        kernal_dist = np.exp(-((dist / sigma_um) ** p))
    else:
        # this mimic the kilosort case where a sigma on x and y are diffrents.
        # note that in that case the distance metric become a cityblock
        sigma_x, sigma_y = sigma_um
        distx = np.abs(locations_1[:, 0][:, np.newaxis] - locations_2[:, 0][np.newaxis, :])
        disty = np.abs(locations_1[:, 1][:, np.newaxis] - locations_2[:, 1][np.newaxis, :])
        kernal_dist = np.exp(-((distx / sigma_x) ** p) - (disty / sigma_y) ** p)
    return kernal_dist