code: def log_audio_to_tb(
      swriter,
      spect,
      name,
      step,
      griffin_lim_mag_scale=1024,
      griffin_lim_power=1.2,
      sr=22050,
      n_fft=1024,
      n_mels=80,
      fmax=8000,
  ):
      filterbank = librosa.filters.mel(
          sr=sr, n_fft=n_fft, n_mels=n_mels, fmax=fmax
      )
      log_mel = spect.data.cpu().numpy().T
      mel = np.exp(log_mel)
      magnitude = np.dot(mel, filterbank) * griffin_lim_mag_scale
      audio = griffin_lim(magnitude.T**griffin_lim_power)
      swriter.add_audio(
          name, audio / max(np.abs(audio)), step, sample_rate=sr
      )
  
imports: from enum import Enum
  from typing import Optional, Tuple
  import librosa
  import matplotlib.pylab
  import numpy
  import torch
  from einops import rearrange
  from numba import jit, prange
  from nemo.collections.tts.torch.tts_data_types import DATA_STR2DATA_CLASS, MAIN_DATA_TYPES, WithLens
  from nemo.utils import logging
  from nemo.utils.decorators import deprecated
label_desc: Use image node_id 12 for calling a global function with example usage: log_audio_to_tb(swriter, spect, name, step, griffin_lim_mag_scale, griffin_lim_power, sr, n_fft, n_mels, fmax) without return types