code: def __init__(self):
      stats = ["xent", "ppl", "accuracy", "tgtper", "lr"]
      metrics = ["BLEU", "TER"]
      self.scalars = {}
      self.scalars["train"] = [("progress/" + stat) for stat in stats]
      self.scalars["valid"] = [("valid/" + stat) for stat in stats]
      self.scalars["valid_metrics"] = self.scalars["valid"] + [
          ("valid/" + metric) for metric in metrics
      ]
  
imports: from tensorboard.backend.event_processing import event_accumulator
  from argparse import ArgumentParser
  import os
label_desc: Use image node_id 1 to create a new TestEvents object  with example: obj = TestEvents()