An (attempted) implementation of SonicFlow using python