class_docstr: FileWriter for test.
  
  TensorFlow FileWriter uses TensorFlow's Protobuf Python binding
  which is largely discouraged in TensorBoard. We do not want a
  TB.Writer but require one for testing in integrational style
  (writing out event files and use the real event readers).
code: def add_summary(self, summary, global_step=None):
      if isinstance(summary, summary_pb2.Summary):
          tf_summary = tf.compat.v1.Summary.FromString(
              summary.SerializeToString()
          )
      else:
          tf_summary = summary
          if not isinstance(summary, bytes):
              logger.error(
                  "Added TensorFlow summary proto. "
                  "Please prefer TensorBoard copy of the proto"
              )
      super().add_summary(tf_summary, global_step)
  
imports: import threading
  import tensorflow
  from tensorboard.compat.proto import event_pb2
  from tensorboard.compat.proto import graph_pb2
  from tensorboard.compat.proto import meta_graph_pb2
  from tensorboard.compat.proto import summary_pb2
  from tensorboard.util import tb_logging
label_desc: Use image node_id 4 for calling the FileWriter obj's underlying member method code with example usage: obj.add_summary(summary, global_step) without return types