(iterable_obj, chunk_size=1)
| 185 | |
| 186 | |
| 187 | def get_chunks(iterable_obj, chunk_size=1): |
| 188 | chunk_size = max(1, chunk_size) |
| 189 | return ( |
| 190 | iterable_obj[i : i + chunk_size] |
| 191 | for i in range(0, len(iterable_obj), chunk_size) |
| 192 | ) |
| 193 | |
| 194 | |
| 195 | def dispatch_queue(loader): |