class_docstr: This class handles iteration events to log summaries to
  the TensorBoard log.
docstr: Write to tensorboard when received the iteration finished signal.
  
  :param _sender:
  :param msg:
code: def write_tensorboard(self, _sender, **msg):
      """
      Write to tensorboard when received the iteration finished signal.
  
      :param _sender:
      :param msg:
      """
      _iter_msg = msg["iter_msg"]
      if not self._is_writing(_iter_msg.current_iter):
          return
      if _iter_msg.is_training:
          _iter_msg.to_tf_summary(self.writer_train)
      elif _iter_msg.is_validation:
          _iter_msg.to_tf_summary(self.writer_valid)
  
file_path: NiftyNet/niftynet/engine/handler_tensorboard.py
imports: import os
  import tensorflow
  from niftynet.engine.application_variables import TF_SUMMARIES
  from niftynet.engine.signal import TRAIN, VALID, ITER_STARTED, ITER_FINISHED, GRAPH_CREATED
  from niftynet.io.misc_io import get_latest_subfolder
label_desc: Use image node_id 4 for calling the TensorBoardLogger obj's underlying member method code with example usage: obj.write_tensorboard(_sender) without return types