<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _prepare_vcf_rec(rec, pops, known, impact_info):
 """Parse a vcfanno output into a dictionary of useful attributes. """

    out = {}
    for k in pops + known:
        out[k] = rec.INFO.get(k)
    if impact_info:
        cur_info = rec.INFO.get(impact_info.id)
        if cur_info:
            cur_impacts = [impact_info.gclass(e, impact_info.header) for e in _from_bytes(cur_info).split(",")]
            top = geneimpacts.Effect.top_severity(cur_impacts)
            if isinstance(top, list):
                top = top[0]
            out["impact_severity"] = top.effect_severity
    return out