This is just cosmetic, isn't it?  As `${function(..)}` isn't valid puppet syntax, maybe just return `value`.