code: def check_tensorboard(hparams):
      """Checks whether Tensorboard is enabled and initializes the logger if it is
      Arguments
      ---------
      hparams: dict
          the hyperparameter dictionary
      """
      if hparams["use_tensorboard"]:
          try:
              from speechbrain.utils.train_logger import (
                  TensorboardLogger,
              )
  
              hparams["tensorboard_train_logger"] = TensorboardLogger(
                  hparams["tensorboard_logs"]
              )
          except ImportError:
              logger.warning(
                  "Could not enable TensorBoard logging - TensorBoard is not available"
              )
              hparams["use_tensorboard"] = False
  
file_path: speechbrain/recipes/LJSpeech/TTS/vocoder/diffwave/train.py
imports: import torchaudio
  import logging
  import sys
  import torch
  import speechbrain
  import os
  from hyperpyyaml import load_hyperpyyaml
label_desc: Use image node_id 2 for calling a global function with example usage: check_tensorboard(hparams) without return types