def check_and_remove_for_embedding(tag, images=None, labels=None, global_step=None):
<EOL>projector_file_path = os.path.join(_LOGDIR, _PROJECTOR_CONFIG_PBTXT)<EOL>assert file_exists(projector_file_path)<EOL>data_dir = os.path.join(_LOGDIR, _get_embedding_dir(tag, global_step))<EOL>assert dir_exists(data_dir)<EOL>tensors_tsv_path = os.path.join(data_dir, _TENSORS_TSV)<EOL>assert file_exists(tensors_tsv_path)<EOL>metadata_tsv_path = None<EOL>if labels is not None:  <EOL><INDENT>metadata_tsv_path = os.path.join(data_dir, _METADATA_TSV)<EOL>assert file_exists(metadata_tsv_path)<EOL><DEDENT>sprite_png_path = None<EOL>if images is not None:  <EOL><INDENT>sprite_png_path = os.path.join(data_dir, _SPRITE_PNG)<EOL>assert file_exists(sprite_png_path)<EOL><DEDENT>safe_remove_file(projector_file_path)<EOL>safe_remove_file(metadata_tsv_path)<EOL>safe_remove_file(sprite_png_path)<EOL>safe_remove_file(tensors_tsv_path)<EOL>safe_remove_dir(data_dir)<EOL>safe_remove_logdir()<EOL>
1. verify projector_config.pbtxt exists under _LOGDIR.
    2. verify folder str(global_step).zfill(5) exists under _LOGDIR.
    3. verify metadata.tsv exists under _LOGDIR/str(global_step).zfill(5).
    4. verify sprinte.png exists under _LOGDIR/str(global_step).zfill(5).
    5. verify tensors.tsv exists under _LOGDIR/str(global_step).zfill(5).
    6. remove all of them and _LOGDIR.