def get_temp_file(extension='<STR_LIT>'):
if extension and not extension.startswith('<STR_LIT:.>'):<EOL><INDENT>extension = '<STR_LIT:.>' + extension<EOL><DEDENT>file_name = '<STR_LIT>' + extension<EOL>temp_dir = tempfile.mkdtemp()<EOL>return os.path.join(temp_dir, file_name)<EOL>
Return a unique new temporary file location to a non-existing
temporary file that can safely be created without a risk of name
collision.