Coroutines provide a powerful programming paradigm for functions that preserve state between invocations.
coroutine.py: implements a coroutinemy_printerthat can can be "created" by invocating the function, "started" using thenext()method, "invoked" using thesend()method, and terminated using theclose()method.longest_run.py: stateful streaming parser implemented using a coroutine. It keeps track of the longest run of characters in a string that is presented one batch at the time.stats.py: coroutine implementation for collecting statistics (mean, standard deviation).data.txt: data file to compute statistical measures from.