[core][py] gc engine: code rewriting