def add_text(self, tag, text, global_step=None):
self._file_writer.add_summary(text_summary(tag, text), global_step)<EOL>if tag not in self._text_tags:<EOL><INDENT>self._text_tags.append(tag)<EOL>extension_dir = self.get_logdir() + '<STR_LIT>'<EOL>if not os.path.exists(extension_dir):<EOL><INDENT>os.makedirs(extension_dir)<EOL><DEDENT>with open(extension_dir + '<STR_LIT>', '<STR_LIT:w>') as fp:<EOL><INDENT>json.dump(self._text_tags, fp)<EOL><DEDENT><DEDENT>
Add text data to the event file.

        Parameters
        ----------
            tag : str
                Name for the `text`.
            text : str
                Text to be saved to the event file.
            global_step : int
                Global step value to record.