code: def __init__(self, tensorboard_log_dir: str):
      # TODO: After adding wandb logger, create common parent class for both loggers
      from torch.utils.tensorboard import SummaryWriter
  
      tensorboard_log_dir = expand_path(tensorboard_log_dir)
      self.tb_train_writer = SummaryWriter(
          str(tensorboard_log_dir / "train_log")
      )
      self.tb_valid_writer = SummaryWriter(
          str(tensorboard_log_dir / "valid_log")
      )
  
file_path: DeepPavlov/deeppavlov/core/common/log_events.py
imports: from logging import getLogger
  from typing import Optional
  from deeppavlov.core.commands.utils import expand_path
label_desc: Use image node_id 1 to create a new TBWriter object  with example: obj = TBWriter(tensorboard_log_dir)