@motor_coroutine
    def stream_to_handler(self, request_handler):
        written = 0
        while written < self.length:
            # Reading chunk_size at a time minimizes buffering.
            f = self._framework.yieldable(self.read(self.chunk_size))
            yield f
            chunk = f.result()

            # write() simply appends the output to a list; flush() sends it
            # over the network and minimizes buffering in the handler.
            request_handler.write(chunk)
            request_handler.flush()
            written += len(chunk)
Write the contents of this file to a
dataset/ETHPy150Open mongodb/motor/motor/motor_gridfs.py/AgnosticGridOut.stream_to_handler