Issue #2760659 by lauriii, yogeshmpawar, vmachado, anya_m, alexpott, Fabianx, joelpittet, xjm: Allow the use of callbacks instead of global functions in preprocess function callbacks (cherry picked from commit fb3dc749)