def METHOD_NAME(neigh_ind, _y, n_neighbors):
    if has_scipy():
        import scipy.stats as stats
    else:
        raise RuntimeError("Scipy is needed to run predict()")
    neigh_ind = neigh_ind.astype(np.int64)
    ypred, count = stats.mode(_y[neigh_ind], axis=1)
    return ypred.ravel(), count.ravel() * 1.0 / n_neighbors