code: def readline(self, size=-1):
          
          if self.closed:
              raise ValueError("I/O operation on closed file")
  
          pos = self.buffer.find(b"\n") + 1
          if pos == 0:
              # no newline found.
              while True:
                  buf = self.fileobj.read(self.blocksize)
                  self.buffer += buf
                  if not buf or b"\n" in buf:
                      pos = self.buffer.find(b"\n") + 1
                      if pos == 0:
                          # no newline found.
                          pos = len(self.buffer)
                      break
  
          if size != -1:
              pos = min(size, pos)
  
          buf = self.buffer[:pos]
          self.buffer = self.buffer[pos:]
          self.position += len(buf)
          return buf
docs: Read one entire line from the file. If size is present
             and non-negative, return a string with at most that
             size, which may be an incomplete line.