class_docstr: This class is adapted with minor modifications from
  https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/summary/writer/writer.py#L125
  Users should not use this class directly for logging MXNet data.
  This class abstractly implements the SummaryWriter API: add_summary.
  The endpoint generates an event protobuf from the Summary object, and passes
  the event protobuf to _event_writer, which is of type EventFileWriter, for logging.
docstr: Adds a `Summary` protocol buffer to the event file.
  This method wraps the provided summary in an `Event` protocol buffer and adds it
  to the event file.
  
  Parameters
  ----------
    summary : A `Summary` protocol buffer
        Optionally serialized as a string.
    global_step: Number
        Optional global step value to record with the summary.
docstr_tok: ["Adds","a","`","Summary","`","protocol","buffer","to","the","event","file",".","This","method","wraps","the","provided","summary","in","an","`","Event","`","protocol","buffer","and","adds","it","to","the","event","file",".","Parameters","--","--","--","--","--","summary",":","A","`","Summary","`","protocol","buffer","Optionally","serialized","as","a","string",".","global_step",":","Number","Optional","global","step","value","to","record","with","the","summary","."]
code: def add_summary(self, summary, global_step=None):
      """Adds a `Summary` protocol buffer to the event file.
      This method wraps the provided summary in an `Event` protocol buffer and adds it
      to the event file.
  
      Parameters
      ----------
        summary : A `Summary` protocol buffer
            Optionally serialized as a string.
        global_step: Number
            Optional global step value to record with the summary.
      """
      if isinstance(summary, bytes):
          summ = summary_pb2.Summary()
          summ.ParseFromString(summary)
          summary = summ
  
      # We strip metadata from values with tags that we have seen before in order
      # to save space - we just store the metadata on the first value with a
      # specific tag.
      for value in summary.value:
          if not value.metadata:
              continue
  
          if value.tag in self._seen_summary_tags:
              # This tag has been encountered before. Strip the metadata.
              value.ClearField("metadata")
              continue
  
          # We encounter a value with a tag we have not encountered previously. And
          # it has metadata. Remember to strip metadata from future values with this
          # tag string.
          self._seen_summary_tags.add(value.tag)
  
      event = event_pb2.Event(summary=summary)
      self._add_event(event, global_step)
  
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 2 for calling the SummaryToEventTransformer obj's underlying member method code with example usage: obj.add_summary(summary, global_step) without return types