code: def writelines(self, lines, level=0):
          
          for line in lines:
              for line in line.rstrip(u'\n').split(u'\n'):
                  self.write(line.rstrip(u'\n'), level=level)
docs: Write multiple messages.