code: def lines_from_stream(chunks):
      
      buf = buffer.DecodingLineBuffer()
      for chunk in chunks:
          buf.feed(chunk)
          # when Python 3, yield from buf
          for _ in buf:
              yield _
docs: Given data in chunks, yield lines of text