Session08 - Generators, Decorators, Context Managers, Iterators

I'd rather see you ask for forgiveness than permission here.  Just try to write to file_out.  If it fails, either inform the user that they have to supply an open file handle or open a file and set it.  Remember the EAFP principle.