This is a preprocessor that inserts ‘stage’ messages and appends ‘unstage’.
The first time an object is seen in plan, it is staged. To avoid redundant staging we actually stage the object’s ultimate parent.
At the end, in a finally block, an ‘unstage’ Message issued for every ‘stage’ Message.
- planiterable or iterator
a generator, list, or similar containing Msg objects
messages from plan with ‘stage’ messages inserted and ‘unstage’ messages appended