refactoring of python obfuscator code