This is a Python rewrite of the code at #83. Co-authored-by: Nemo <commits@captnemo.in> Co-authored-by: Marc Wrobel <marc.wrobel@gmail.com>