apply_* methods return new objects - make that known to swig

likely fixes #7323621