code: def __init__(self, name="train", task_type=None):
      self.name = name
      self.task_type = task_type
  
      self._epoch_total = cfg.optim.max_epoch
      self._time_total = 0  # won't be reset
  
      self.out_dir = "{}/{}".format(cfg.run_dir, name)
      makedirs(self.out_dir)
      if cfg.tensorboard_each_run:
          from tensorboardX import SummaryWriter
  
          self.tb_writer = SummaryWriter(self.out_dir)
  
      self.reset()
  
imports: import logging
  import math
  import sys
  import torch
  import graphgym.register
  from graphgym.config import cfg
  from graphgym.utils.device import get_current_gpu_usage
  from graphgym.utils.io import dict_to_json, dict_to_tb, makedirs
label_desc: Use image node_id 1 to create a new Logger object from inherited base classes: object with example: obj = Logger(name, task_type)