code: def add(self, data_size, val_size=0, metric_name=None, name=None):
      if not metric_name:
          metric_name = "acc"
      self.data.append(
          {
              "name": name
              if name
              else "Train op. " + str(len(self.data)),
              "metric_name": metric_name,
              "data_size": data_size,
              "epoch": 0,
              "step": 0,
              "val_size": val_size,
              "loss": None,
              "acc": None,
              "val_loss": None,
              "val_acc": None,
          }
      )
      self.global_data_size += data_size
      self.global_val_data_size += val_size
  
imports: from __future__ import division, print_function, absolute_import
  import time
  import sys
label_desc: Use image node_id 2 for calling the TermLogger obj's underlying member method code with example usage: obj.add(data_size, val_size, metric_name, name) without return types