(base: str)
| 101 | used: set[str] = set() |
| 102 | |
| 103 | def make_unique(base: str) -> str: |
| 104 | if base not in used: |
| 105 | used.add(base) |
| 106 | return base |
| 107 | for k in range(2, 1000): |
| 108 | cand = f"{base}-{k}" |
| 109 | if cand not in used: |
| 110 | used.add(cand) |
| 111 | return cand |
| 112 | return base + "-x" |
| 113 | |
| 114 | for blk in blocks: |
| 115 | if blk.kind == "hr": |