def get_query_id_column(query: sa.Select) -> Optional[sa.ColumnElement]:
    """Returns ID column element from query or None if column not found."""
    col = get_query_column(query, "sys__id")
    return col if col is not None and isinstance(col, sa.ColumnElement) else None
Returns ID column element from query or None if column not found.
src/datachain/query/utils.py