(bucket: dict[str, list[dict]], key: str | None)
| 185 | consumed: set[int] = set() |
| 186 | |
| 187 | def take(bucket: dict[str, list[dict]], key: str | None) -> str | None: |
| 188 | if not key: |
| 189 | return None |
| 190 | for e in bucket.get(key, []): |
| 191 | if id(e) not in consumed: |
| 192 | consumed.add(id(e)) |
| 193 | return e["summary"] |
| 194 | return None |
| 195 | |
| 196 | restored = 0 |
| 197 |