def check_event_file_and_remove_logdir():
files = os.listdir(_LOGDIR)<EOL>assert len(files) == <NUM_LIT:1><EOL>file_path = os.path.join(_LOGDIR, files[<NUM_LIT:0>])<EOL>assert file_exists_with_prefix(file_path, _EVENT_FILE_PREFIX)<EOL>safe_remove_file(file_path)<EOL>safe_remove_logdir()<EOL>
Check whether the event file exists and then remove the logdir.