def merge_recs_headers(recs):
    """
    take a list of recs [rec1,rec2,rec3....], each rec is a dictionary.
    make sure that all recs have the same headers.
    """
    headers = []
    for rec in recs:
        keys = list(rec.keys())
        for key in keys:
            if key not in headers:
                headers.append(key)
    for rec in recs:
        for header in headers:
            if header not in list(rec.keys()):
                rec[header] = ''
    return recs
