Should this use an import hook instead of modifying sys.modules? Currently we import re and regex which would be nice to avoid. An import hook seems like a cleaner approach, but would require much more code than the current one-liner
https://www.python.org/dev/peps/pep-0302/