minimal changes to have this imported by nepi in py3