class_docstr: This class is adapted from
  https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/summary/writer/writer.py.
  Even though this class provides user-level APIs in TensorFlow, it is recommended to use the
  interfaces defined in the class `SummaryWriter` (see below) for logging in MXNet as they are
  directly compatible with the MXNet NDArray type.
  This class writes `Summary` protocol buffers to event files. The `FileWriter` class provides
  a mechanism to create an event file in a given directory and add summaries and events to it.
  The class updates the file contents asynchronously.
docstr: Creates a `FileWriter` and an event file.
  On construction the summary writer creates a new event file in `logdir`.
  This event file will contain `Event` protocol buffers constructed when you
  call one of the following functions: `add_summary()`, or `add_event()`.
  
  Parameters
  ----------
      logdir : str
          Directory where event file will be written.
      max_queue : int
          Size of the queue for pending events and summaries.
      flush_secs: Number
          How often, in seconds, to flush the pending events and summaries to disk.
      filename_suffix : str
          Every event file's name is suffixed with `filename_suffix` if provided.
      verbose : bool
          Determines whether to print logging messages.
docstr_tok: ["Creates","a","`","FileWriter","`","and","an","event","file",".","On","construction","the","summary","writer","creates","a","new","event","file","in","`","logdir","`",".","This","event","file","will","contain","`","Event","`","protocol","buffers","constructed","when","you","call","one","of","the","following","functions",":","`","add_summary","(",")","`",",","or","`","add_event","(",")","`",".","Parameters","--","--","--","--","--","logdir",":","str","Directory","where","event","file","will","be","written",".","max_queue",":","int","Size","of","the","queue","for","pending","events","and","summaries",".","flush_secs",":","Number","How","often",",","in","seconds",",","to","flush","the","pending","events","and","summaries","to","disk",".","filename_suffix",":","str","Every","event","file","'s","name","is","suffixed","with","`","filename_suffix","`","if","provided",".","verbose",":","bool","Determines","whether","to","print","logging","messages","."]
code: def __init__(
      self,
      logdir,
      max_queue=10,
      flush_secs=120,
      filename_suffix=None,
      verbose=True,
  ):
      """Creates a `FileWriter` and an event file.
      On construction the summary writer creates a new event file in `logdir`.
      This event file will contain `Event` protocol buffers constructed when you
      call one of the following functions: `add_summary()`, or `add_event()`.
  
      Parameters
      ----------
          logdir : str
              Directory where event file will be written.
          max_queue : int
              Size of the queue for pending events and summaries.
          flush_secs: Number
              How often, in seconds, to flush the pending events and summaries to disk.
          filename_suffix : str
              Every event file's name is suffixed with `filename_suffix` if provided.
          verbose : bool
              Determines whether to print logging messages.
      """
      event_writer = EventFileWriter(
          logdir, max_queue, flush_secs, filename_suffix, verbose
      )
      super(FileWriter, self).__init__(event_writer)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import time
  import json
  import os
  import logging
  from .proto import event_pb2
  from .proto import summary_pb2
  from .event_file_writer import EventFileWriter
  from .summary import scalar_summary, histogram_summary, image_summary, audio_summary
  from .summary import text_summary, pr_curve_summary, _net2pb
  from .utils import _save_embedding_tsv, _make_sprite_image, _make_metadata_tsv
  from .utils import _add_embedding_config, _make_numpy_array, _get_embedding_dir
  from .utils import _is_2D_matrix
label_desc: Use image node_id 1 to create a new FileWriter object from inherited base classes: SummaryToEventTransformer with example: obj = FileWriter(logdir, max_queue, flush_secs, filename_suffix, verbose)