I think this should be using `log.warn()` instead of `print()` but otherwise looks like a useful thing to have.