<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _sanitizeFilename(filename):
 """Sanitizes filename for use on Windows and other brain-dead systems, by replacing a number of illegal characters with underscores."""

    global _sanitize_trans
    out = filename.translate(_sanitize_trans)
    # leading dot becomes "_"
    if out and out[0] == '.':
        out = out[1:]
    return out