I do it this way now - push a file through a script in the command line. But I would be more happy with a handy gui-mouse-click-copy-paste solution. Ideally I'd like a panel in something Sublime/Gedit-like where I would just paste a python function, click run and have it applied without even saving the file to the hard drive.
Having a live preview of the diff before any changes were applied (like vscode and most editors do when using find/replace) would make this a lot more useful.