advanced programming techniques @coroutine def reporter()while truefilename (yieldprint(filename@coroutine decorator os walk( we have used the same @coroutine decorator that we created in the previous subsubsection the get_files(coroutine is essentially wrapper around the os walk(function and that expects to be given paths or filenames to work on @coroutine def get_files(receiver)while truepath (yieldif os path isfile(path)receiver send(os path abspath(path)elsefor rootdirsfiles in os walk(path)for filename in filesreceiver send(os path abspathos path join(rootfilename))this coroutine has the now-familiar structurean infinite loop in which we wait for the yield to return value that we can processand then we send the result to the receiver @coroutine def suffix_matcher(receiversuffixes)while truefilename (yieldif filename endswith(suffixes)receiver send(filenamethis coroutine looks simple--and it is--but notice that it sends only filenames that match the suffixesso any that don' match are filtered out of the pipeline @coroutine def size_matcher(receiverminimum=nonemaximum=none)while truefilename (yieldsize os path getsize(filenameif ((minimum is none or size >minimumand (maximum is none or size <maximum))receiver send(filename