Rename _apply_transform to _transform_selected and make it a function
rather than a method.