class_docstr: Logs training information in the format required by Tensorboard.
  
  Arguments
  ---------
  save_dir : str
      A directory for storing all the relevant logs.
  
  Raises
  ------
  ImportError if Tensorboard is not installed.
code: def __init__(self, save_dir):
      self.save_dir = save_dir
  
      # Raises ImportError if TensorBoard is not installed
      from torch.utils.tensorboard import SummaryWriter
  
      # Initialize writer only on main
      self.writer = None
      if if_main_process():
          self.writer = SummaryWriter(self.save_dir)
      self.global_step = {
          "train": {},
          "valid": {},
          "test": {},
          "meta": 0,
      }
  
imports: import logging
  import torch
  import os
  from speechbrain.utils.distributed import main_process_only, if_main_process
label_desc: Use image node_id 1 to create a new TensorboardLogger object from inherited base classes: TrainLogger with example: obj = TensorboardLogger(save_dir)