Addapt python script