Here I would rename realizations -> real_per_task.
1000 is an unhappy number. One gets numbers like 31, 32, 33, it is easy to get confused between number of realizations and number of tasks. Let's use 100. Since divmod(100, 32) = (3, 4), one has 33 tasks each with 3 realizations except the last one with 4 realizations.