The code frequently `print()`s to stdout. Most of those cases should probably be replaced with a `logging.Logger`.