def write2file(res):
    for li in res:
        fwrite.fwrite_append(loc_class_out, utils.arr2str(li))
def classf(carr, tagdir):
    res = []
    for idx in tagdir:
        if tagdir[idx][1] in carr:
            res.append(idx)
    fwrite.fwrite_append(loc_class_out, utils.arr2str(res))