class_docstr: Writes entries to event files in the logdir to be consumed by Tensorboard.
docstr: Creates SummaryWriter instance.
  
  Args:
      logdir: directory where event file will be written.
      queue_size: size of the queue for pending events and summaries
                  before one of the 'add' calls forces a flush to disk.
      write_interval: how often, in seconds, to write the pending events and summaries to disk.
docstr_tok: ["Creates","SummaryWriter","instance",".","Args",":","logdir",":","directory","where","event","file","will","be","written",".","queue_size",":","size","of","the","queue","for","pending","events","and","summaries","before","one","of","the","'add","'","calls","forces","a","flush","to","disk",".","write_interval",":","how","often",",","in","seconds",",","to","write","the","pending","events","and","summaries","to","disk","."]
code: def __init__(
      self, logdir: str, queue_size: int = 5, write_interval: int = 5
  ):
      """Creates SummaryWriter instance.
  
      Args:
          logdir: directory where event file will be written.
          queue_size: size of the queue for pending events and summaries
                      before one of the 'add' calls forces a flush to disk.
          write_interval: how often, in seconds, to write the pending events and summaries to disk.
      """
      if not os.path.isdir(logdir):
          os.makedirs(logdir, exist_ok=True)
  
      self.writer = EventFileWriter(logdir, queue_size, write_interval)
  
imports: import enum
  import os
  from time import time
  from typing import Union, Callable, Tuple, ByteString
  import numpy
  from tensorboard.compat.proto import event_pb2
  from tensorboard.compat.proto import summary_pb2
  from tensorboard.summary.writer.event_file_writer import EventFileWriter
  from tensorboard.util.tensor_util import make_tensor_proto
  from objax import util
label_desc: Use image node_id 1 to create a new SummaryWriter object  with example: obj = SummaryWriter(logdir, queue_size, write_interval)