code: def test_torch_stft():
      torch_stft = TorchSTFT(ap.fft_size, ap.hop_length, ap.win_length)
      # librosa stft
      wav = ap.load_wav(WAV_FILE)
      M_librosa = abs(
          stft(
              y=wav,
              fft_size=ap.fft_size,
              hop_length=ap.hop_length,
              win_length=ap.win_length,
          )
      )
      # torch stft
      wav = torch.from_numpy(wav[None, :]).float()
      M_torch = torch_stft(wav)
      # check the difference b/w librosa and torch outputs
      assert (M_librosa - M_torch[0].data.numpy()).max() < 1e-5
  
file_path: TTS/tests/vocoder_tests/test_vocoder_losses.py
imports: import os
  import torch
  from tests import get_tests_input_path, get_tests_output_path, get_tests_path
  from TTS.config import BaseAudioConfig
  from TTS.utils.audio import AudioProcessor
  from TTS.utils.audio.numpy_transforms import stft
  from TTS.vocoder.layers.losses import MelganFeatureLoss, MultiScaleSTFTLoss, STFTLoss, TorchSTFT
label_desc: Use image node_id 1 for calling a global function with example usage: test_torch_stft() without return types