def _group_by_id(lines):
    """Group lines by identifier."""
    groups = []
    for line in lines:
        line = line.strip()
        if line.startswith('ID'):
            groups.append([])
        if not groups:
            continue
        descriptor = line[:2]
        value = line[5:]
        groups[-1].append((descriptor, value))
    return groups
