How to change takes order with python?

Is it possible to change the order of the take list using python?

MoveTakesHelp

The only answer I have found so far is by duplicating takes and removing old ones.