code: def on_sub_batch_end(self, training_state, train_index=0):
      self.data[train_index]["loss"] = training_state.loss_value
      self.data[train_index]["acc"] = training_state.acc_value
      self.data[train_index]["val_loss"] = training_state.val_loss
      self.data[train_index]["val_acc"] = training_state.val_acc
      self.data[train_index]["epoch"] = training_state.epoch
      self.data[train_index]["step"] = training_state.current_iter
  
imports: from __future__ import division, print_function, absolute_import
  import time
  import sys
label_desc: Use image node_id 8 for calling the TermLogger obj's underlying member method code with example usage: obj.on_sub_batch_end(training_state, train_index) without return types