def METHOD_NAME(neigh, transformer, knn):
    neigh.compute_neighbors(
        n_neighbors, transformer=transformer, method='gauss', knn=knn
    )
    dists = neigh.distances.toarray() if issparse(neigh.distances) else neigh.distances
    np.testing.assert_allclose(dists, distances_euclidean_all)