def check_and_remove_logdir_for_text():
<EOL>plugins_path = os.path.join(_LOGDIR, _PLUGINS)<EOL>tensorboard_text_path = os.path.join(plugins_path, _TENSORBOARD_TEXT)<EOL>file_path = os.path.join(tensorboard_text_path, _TENSORS_JSON)<EOL>assert file_exists(file_path)<EOL>safe_remove_file(file_path)<EOL>safe_remove_dir(tensorboard_text_path)<EOL>safe_remove_dir(plugins_path)<EOL>event_files = os.listdir(_LOGDIR)<EOL>assert len(event_files) == <NUM_LIT:1><EOL>event_file_path = os.path.join(_LOGDIR, event_files[<NUM_LIT:0>])<EOL>assert file_exists_with_prefix(event_file_path, _EVENT_FILE_PREFIX)<EOL>safe_remove_file(event_file_path)<EOL>safe_remove_logdir()<EOL>
1. verify that tensors.json exists under _LOGDIR/plugins/tensorboard_text.
    2. verify that the event files exists and remove it.