I think some basic extract method has made it into lsp-mode or some enhancement, I have been seeing it for Go at least. That could serve as an inspiration.
I haven't honestly played around with it though to see if it successfully converts local variables to parameters/return values though, which would be the biggest time saver.
E.g. extract method, extract class, advanced navigation like "data flow to here" etc
They may not work in extremely dynamic Python code (e.g. they will obviously not work past an `exec`).