Each task is per-partition!
The code you highlighted is where we calculate the per-partition limit. It’s done by either:
1. None in the case where we don’t have a global remaining number of rows
2. Taking the minimum of the size of the partition and the global remaining number of rows