def METHOD_NAME(
    sortkeys: List[Any],
    group_clauses: Optional[List[str]] = None,
    aggs: Optional[Dict[str, Dict[str, str]]] = None,
    column_map: Optional[Dict[str, str]] = None,
) -> str:
    if not sortkeys:
        if not group_clauses and not aggs:
            # Always sort on ID for stable paging
            return ":id"
        # In an aggregation, we don't have access to the ":id" column (we're
        # not aggregating on it)
        return ""
    clauses = []
    for key in sortkeys:
        if key.nulls_first != key.is_reversed:
            raise ValueError("Unsupported SortKey %s" % str(key))
        order = "DESC" if key.is_reversed else "ASC"
        clauses.append(f"{_emit_col(key.attname, column_map)} {order}")
    return ",".join(clauses)