def METHOD_NAME(mocker, neigh, method):
    """umap and gauss behave the same for distances.
    They call pynndescent for large data.
    """
    from pynndescent import NNDescent
    # When trying to compress a too-small index, pynndescent complains
    mocker.patch.object(NNDescent, 'compress_index', return_val=None)
    neigh.compute_neighbors(n_neighbors, method=method)
    np.testing.assert_allclose(neigh.distances.toarray(), distances_euclidean)