def METHOD_NAME(obj, fn):
    x, y, z = read_co(obj).T
    to_delete = np.nonzero(fn(x, y, z))[0]
    with butil.ViewportMode(obj, 'EDIT'):
        bm = bmesh.from_edit_mesh(obj.data)
        bm.verts.ensure_lookup_table()
        geom = [bm.verts[_] for _ in to_delete]
        bmesh.ops.delete(bm, geom=geom)
        bmesh.update_edit_mesh(obj.data)
    return obj