code: def _sanitize(cls, message):
          
          if isinstance(message, list):
              if len(message) == 0:
                  sanitized = u"Empty log message"
              elif len(message) == 1:
                  sanitized = message[0]
              else:
                  sanitized = message[0] % tuple(message[1:])
          else:
              sanitized = message
          if not gf.is_unicode(sanitized):
              raise TypeError("The given log message is not a Unicode string")
          return sanitized
docs: Sanitize the given message,
          dealing with multiple arguments
          and/or string formatting.
  
          :param message: the log message to be sanitized
          :type  message: string or list of strings
          :rtype: string