code: def _make_readline_peeker(self):
          
          counter = itertools.count(0)
          def readline():
              try:
                  return self._peek_buffer(next(counter))
              except StopIteration:
                  return ''
          return readline
docs: Make a readline-like function which peeks into the source.