<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ConvertStringToFilename(name):
 """Converts an unicode string to a filesystem safe filename. For maximum compatibility we escape all chars which are not alphanumeric (in the unicode sense). Args: name: a unicode string that is part of a subject. Returns: A safe filename with escaped special chars. """

  return re.sub(
      r"\W", lambda x: "%%%02X" % ord(x.group(0)), name,
      flags=re.UNICODE).rstrip("/")