def METHOD_NAME(handle):
    for line in handle:
        if line.startswith("BEGIN_SEQUENCE"):
            record = Record()
            record.file_name = line[15:].rstrip()
            break
    else:
        return  # No record found
    for line in handle:
        if line.startswith("BEGIN_COMMENT"):
            break
    else:
        raise ValueError("Failed to find BEGIN_COMMENT line")
    for line in handle:
        line = line.strip()
        if not line:
            continue
        if line == "END_COMMENT":
            break
        keyword, value = line.split(":", 1)
        keyword = keyword.lower()
        value = value.strip()
        if keyword in (
            "chromat_file",
            "phred_version",
            "call_method",
            "chem",
            "dye",
            "time",
            "basecaller_version",
            "trace_processor_version",
        ):
            record.comments[keyword] = value
        elif keyword in (
            "abi_thumbprint",
            "quality_levels",
            "trace_array_min_index",
            "trace_array_max_index",
        ):
            record.comments[keyword] = int(value)
        elif keyword == "trace_peak_area_ratio":
            record.comments[keyword] = float(value)
        elif keyword == "trim":
            first, last, prob = value.split()
            record.comments[keyword] = (int(first), int(last), float(prob))
    else:
        raise ValueError("Failed to find END_COMMENT line")
    for line in handle:
        if line.startswith("BEGIN_DNA"):
            break
    else:
        raise ValueError("Failed to find BEGIN_DNA line")
    for line in handle:
        if line.startswith("END_DNA"):
            break
        else:
            # Line is: "site quality peak_location"
            # Peak location is optional according to
            # David Gordon (the Consed author)
            parts = line.split()
            if len(parts) in [2, 3]:
                record.sites.append(tuple(parts))
            else:
                raise ValueError(
                    "DNA line must contain a base and quality "
                    "score, and optionally a peak location."
                )
    for line in handle:
        if line.startswith("END_SEQUENCE"):
            break
    else:
        raise ValueError("Failed to find END_SEQUENCE line")
    record.seq = Seq.Seq("".join(n[0] for n in record.sites))
    if record.comments["trim"] is not None:
        first, last = record.comments["trim"][:2]
        record.seq_trimmed = record.seq[first:last]
    return record