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: Add a figure in the logs.
docstr_tok: ["Add","a","figure","in","the","logs","."]
code: def log_figure(self, name, value):
      """Add a figure in the logs."""
      fig = plot_spectrogram(value)
      if fig is not None:
          self.writer.add_figure(name, fig, self.global_step["meta"])
  
imports: import logging
  import torch
  import os
  from speechbrain.utils.distributed import main_process_only, if_main_process
label_desc: Use image node_id 4 for calling the TensorboardLogger obj's underlying member method code with example usage: obj.log_figure(name, value) without return types