<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _clear_temp_dir():
 """ Clear the temporary directory. """

    tempdir = get_tempdir()
    for fname in os.listdir(tempdir):
        try:
            os.remove( os.path.join(tempdir, fname) )
        except Exception:
            pass