code: def write_text_event(self, *args, **kwargs):
      kwargs.setdefault("step", 1)
      writer = tf2.summary.create_file_writer(self.get_temp_dir())
      with writer.as_default():
          summary.text(*args, **kwargs)
      writer.close()
  
imports: import glob
  import os
  import numpy
  import tensorflow
  from tensorboard.compat import tf2
  from tensorboard.compat.proto import summary_pb2
  from tensorboard.plugins.text import metadata
  from tensorboard.plugins.text import summary
  from tensorboard.util import tensor_util
label_desc: Use image node_id 4 for calling the SummaryV2OpTest obj's underlying member method code with example usage: obj.write_text_event() without return types