code: def readline(self, size=None):
          
          data = EMPTY
  
          if size == 0:
              return data
  
          while True:
              if size and len(data) >= size:
                  return data
  
              if not self.buffer:
                  self._fetch()
                  if not self.buffer:
                      # EOF
                      return data
  
              newline_pos = self.buffer.find(LF)
              if size:
                  if newline_pos == -1:
                      remaining = size - len(data)
                      data += self.buffer[:remaining]
                      self.buffer = self.buffer[remaining:]
                  else:
                      remaining = min(size - len(data), newline_pos)
                      data += self.buffer[:remaining]
                      self.buffer = self.buffer[remaining:]
              else:
                  if newline_pos == -1:
                      data += self.buffer
                      self.buffer = EMPTY
                  else:
                      data += self.buffer[:newline_pos]
                      self.buffer = self.buffer[newline_pos:]
docs: Read a single line from rfile buffer and return it.
  
          Args:
              size (int): minimum amount of data to read
  
          Returns:
              bytes: One line from rfile.