This is one of those "what was I thinking?" moments now that I've had some time to level up my python since I wrote this.