def METHOD_NAME(neigh, conv):
    neigh.compute_neighbors(n_neighbors, method='gauss')
    ad = AnnData(np.array(X))
    # Allow deprecated usage for now
    with warnings.catch_warnings():
        warnings.filterwarnings("ignore", category=FutureWarning, module="anndata")
        ad.uns['neighbors'] = dict(connectivities=conv(neigh.connectivities))
    neigh_restored = Neighbors(ad)
    assert neigh_restored.n_neighbors == 1