(l, splits)
| 109 | |
| 110 | |
| 111 | def restore_flatten_list(l, splits): |
| 112 | outl = [] |
| 113 | for split in splits: |
| 114 | assert len(l) >= split, "list length invalid" |
| 115 | sl, l = l[:split], l[split:] |
| 116 | outl.append(sl) |
| 117 | return outl |
| 118 | |
| 119 | |
| 120 | def extract_args(func): |