Python API: Find and replace field names within an analysis

Hi, is there a way we can use the python API to find and replace field names specified in PQL within an analysis?
For example, I’m linking an existing analysis to a new data model and some of the field names differ slightly e.g. BSEG.TS_AUGDT is now BSEG.AUGDT. Is there a way I can easily update the PQL to use the new fieldname definition via the API without having to update manually via the front end?