def combine_recs(rec1, rec2):
    """Utility function for combining two records into one."""
    rec = dict(rec1)
    for k, v in rec2.iteritems():
        if k in rec.keys():
            raise Exception(
                "Cannot combine these recs, and keys overalp (%s)" % k)
        rec[k] = v

    return rec