It is not valid to return non-serializable outputs (such as functions) from a component, as it cannot be serialized into the checkpoint.
We should document patterns that can be used to work around this limitation. We should also ensure that we handle common things that are nearly valid output (such as streams) so they can be returned as needed.