(xs, size)
| 177 | re_ord = utils.Reorderer(requests, _collate) |
| 178 | |
| 179 | def sameuntil_chunks(xs, size): |
| 180 | ret = [] |
| 181 | lastuntil = xs[0][1] |
| 182 | for x in xs: |
| 183 | if len(ret) >= size or x[1] != lastuntil: |
| 184 | yield ret, lastuntil |
| 185 | ret = [] |
| 186 | lastuntil = x[1] |
| 187 | ret.append(x) |
| 188 | |
| 189 | if ret: |
| 190 | yield ret, lastuntil |
| 191 | |
| 192 | # todo: more intelligent batching for heterogeneous `until` |
| 193 | for chunk, until in tqdm( |
nothing calls this directly
no outgoing calls
no test coverage detected