(acc_len: int, text: str)
| 13 | """ |
| 14 | |
| 15 | def push_acc_space(acc_len: int, text: str): |
| 16 | if acc_len == 0: |
| 17 | return text |
| 18 | if acc_len == 1: |
| 19 | return text + ' ' |
| 20 | assert acc_len <= max_len, f'Max whitespace run length {max_len}, but found {acc_len}' |
| 21 | extra_id = start_extra_id - 2 + acc_len |
| 22 | extra_token = f'<|extratoken_{extra_id}|>' |
| 23 | return text + extra_token |
| 24 | |
| 25 | acc_len = 0 |
| 26 | res = '' |
no outgoing calls
no test coverage detected