Given a list of integers where each element is either 0, 1, or 2, sort the list in-place in ascending order (0s first, then 1s, then 2s). You must do this with a single pass (O(n) time) and O(1) extra space. Write a function `sort_colors(nums)` that modifies the input list and returns the modified list. The grader will check the return value.
Constraints
1 ≤ len(nums) ≤ 1000; each element is exactly 0, 1, or 2. Expected time O(n), space O(1).