def METHOD_NAME(instance, particle_idx, ref_result, active_idx=None):
    cur_neigh, _ = instance.find_neighbors_by_idx(particle_idx)
    assert isinstance(cur_neigh, np.ndarray)
    assert len(cur_neigh) == len(set(cur_neigh))
    if active_idx is None:
        active_idx = np.arange(instance._values.shape[1])
    if isinstance(instance, BaseHashNeighborSearch):
        instance.consistency_check()
    for neigh in cur_neigh:
        assert neigh in active_idx
    assert set(cur_neigh) <= set(active_idx)
    neigh_by_coor, _ = instance.find_neighbors_by_coor(
        instance._values[:, particle_idx])
    assert np.allclose(cur_neigh, neigh_by_coor)
    assert isinstance(cur_neigh, np.ndarray)
    assert set(ref_result) == set(cur_neigh)