Actually, should use `reversed(matches or [])` now that `matches` could be `None`.
Line too long, break it up; also, for consistency, use spaces around operators. Below is black's take on this statement, with quotes replaced. (I'm not a fan of many choices made by black, and it's obviously too late to blacken googler, but it does stop all arguments on code formatting.)
```py
abstract = (
abstract[: match['offset']]
+ '\033[1m'
+ match['phrase']
+ '\033[0m'
+ abstract[match['offset'] + len(match['phrase']) :]
)
```
`for match in reversed(matches)` is enough, and doesn't mutate the argument, which is an unintended side effect.