class_docstr: Saves data in event and summary protos for tensorboard.
class_docstr_tok: ["Saves","data","in","event","and","summary","protos","for","tensorboard","."]
code: def add_summary(self, summary, step):
      if not self._enabled:
          return
      event = event_pb2.Event(summary=summary)
      event.wall_time = time.time()
      if step is not None:
          event.step = int(step)
      self._event_writer.add_event(event)
  
imports: import io
  import struct
  import time
  import warnings
  import wave
  import matplotlib
  import matplotlib.pyplot
  import numpy
  import tensorflow
  from tensorflow.core.util import event_pb2
  from tensorflow.python.summary.writer.event_file_writer import EventFileWriter
label_desc: Use image node_id 2 for calling the SummaryWriter obj's underlying member method code with example usage: obj.add_summary(summary, step) without return types