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.
docstr: See TrainLogger.log_stats()
docstr_tok: ["See","TrainLogger.log_stats","(",")"]
code: def log_stats(
      self,
      stats_meta,
      train_stats=None,
      valid_stats=None,
      test_stats=None,
      verbose=False,
  ):
      """See TrainLogger.log_stats()"""
      self.global_step["meta"] += 1
      for name, value in stats_meta.items():
          self.writer.add_scalar(name, value, self.global_step["meta"])
  
      for dataset, stats in [
          ("train", train_stats),
          ("valid", valid_stats),
          ("test", test_stats),
      ]:
          if stats is None:
              continue
          for stat, value_list in stats.items():
              if stat not in self.global_step[dataset]:
                  self.global_step[dataset][stat] = 0
              tag = f"{stat}/{dataset}"
  
              # Both single value (per Epoch) and list (Per batch) logging is supported
              if isinstance(value_list, list):
                  for value in value_list:
                      new_global_step = (
                          self.global_step[dataset][stat] + 1
                      )
                      self.writer.add_scalar(
                          tag, value, new_global_step
                      )
                      self.global_step[dataset][stat] = new_global_step
              else:
                  value = value_list
                  new_global_step = self.global_step[dataset][stat] + 1
                  self.writer.add_scalar(tag, value, new_global_step)
                  self.global_step[dataset][stat] = new_global_step
  
imports: import logging
  import torch
  import os
  from speechbrain.utils.distributed import main_process_only, if_main_process
label_desc: Use image node_id 2 for calling the TensorboardLogger obj's underlying member method code with example usage: obj.log_stats(stats_meta, train_stats, valid_stats, test_stats, verbose) without return types