<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_db_germline_flag(line):
 """Adds a DB flag for Germline filters, allowing downstream compatibility with PureCN. """

    if line.startswith("#CHROM"):
        headers = ['##INFO=<ID=DB,Number=0,Type=Flag,Description="Likely germline variant">']
        return "\n".join(headers) + "\n" + line
    elif line.startswith("#"):
        return line
    else:
        parts = line.split("\t")
        if parts[7].find("STATUS=Germline") >= 0:
            parts[7] += ";DB"
        return "\t".join(parts)