Optional callable to transform the node's output before it is recorded on the node's trace run. Can be used to omit or summarize large payloads (e.g. message history). Not intended to affect the value returned by the node; avoid mutating arguments in place.