def extract_cds_lines(all_bed_lines):
    """Extract bed lines with CDS mark."""
    selected = []
    for line in all_bed_lines.split("\n"):
        if line == "":
            continue
        if line.split("\t")[3].endswith("_CDS"):
            selected.append(line)
    return "\n".join(selected) + "\n"