code: def check_and_remove_logdir_for_text():
      """1. verify that tensors.json exists under _LOGDIR/plugins/tensorboard_text.
      2. verify that the event files exists and remove it."""
      # step 1
      plugins_path = os.path.join(_LOGDIR, _PLUGINS)
      tensorboard_text_path = os.path.join(
          plugins_path, _TENSORBOARD_TEXT
      )
      file_path = os.path.join(tensorboard_text_path, _TENSORS_JSON)
      assert file_exists(file_path)
      safe_remove_file(file_path)
      safe_remove_dir(tensorboard_text_path)
      safe_remove_dir(plugins_path)
      # step 2
      event_files = os.listdir(_LOGDIR)
      assert len(event_files) == 1
      event_file_path = os.path.join(_LOGDIR, event_files[0])
      assert file_exists_with_prefix(
          event_file_path, _EVENT_FILE_PREFIX
      )
      safe_remove_file(event_file_path)
      # remove logdir
      safe_remove_logdir()
  
imports: import shutil
  from mxboard import SummaryWriter
  from mxboard.utils import _make_metadata_tsv, make_image_grid, _make_sprite_image
  from mxboard.utils import _add_embedding_config, _save_embedding_tsv, _get_embedding_dir
  from mxboard.summary import _get_nodes_from_symbol, _net2pb
  from mxboard.proto.node_def_pb2 import NodeDef
  from mxboard.proto.attr_value_pb2 import AttrValue
  from mxboard.proto.graph_pb2 import GraphDef
  from mxboard.proto.versions_pb2 import VersionDef
  from mxnet.test_utils import *
  from mxnet.gluon import nn
  import mxnet
  from common import with_seed, setup_module
  from nose.tools import make_decorator
label_desc: Use image node_id 24 for calling a global function with example usage: check_and_remove_logdir_for_text() without return types