[groovy] Add ability to transform results