code: def __init__(self) -> None:
      self.rank_to_history: Dict[int, List[Event]] = {}
      self.base_time = time.time()
      self.temp_event = None
  
      self.export_format = "png"
      self.export_name = "test"
      self.dpi = 500
      self.theme = "dark_background"
      self.figure_width = 30
      self.figure_height = 10
      self.legend_fontsize = 16
      self.device_fontsize = 20
      self.bar_height = 0.2
  
      if not os.path.exists(LOG_FOLDER):
          os.makedirs(LOG_FOLDER)
  
imports: import atexit
  import json
  import os
  import shutil
  import time
  from typing import Dict, List
  import matplotlib.colors
  import matplotlib.pyplot
  import torch
  import torch.distributed
label_desc: Use image node_id 1 to create a new Recorder object  with example: obj = Recorder()