Refs #5 -- added support for writing context managers with stub