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
  
imports: import logging
  import sys
  import torch
  import speechbrain
  import os
  from collections import namedtuple
  from audiomnist_prepare import prepare_audiomnist
  from hyperpyyaml import load_hyperpyyaml
  from torchaudio import functional
  from speechbrain.dataio.dataio import length_to_mask, write_audio
  from speechbrain.dataio.dataset import apply_overfit_test
  from speechbrain.utils import data_utils
  from speechbrain.utils.train_logger import plot_spectrogram
  from enum import Enum
  from speechbrain.utils.distributed import run_on_main
  from speechbrain.utils.data_utils import dict_value_combinations, dist_stats, masked_mean, masked_min, masked_max, masked_std, match_shape
label_desc: Use image node_id 7 for calling a global function with example usage: check_tensorboard(hparams) without return types