code: def test_stft_complex_winlength(
      n_fft, win_length, hop_length, device
  ):
      x = example_y
      stft = STFT(
          n_fft=n_fft, win_length=win_length, hop_length=hop_length
      ).to(device)
      X = stft(
          torch.tensor(x, device=device).unsqueeze(0),
          output_format="Complex",
      )
      X_real, X_imag = X[:, :, :, 0].squeeze(), X[:, :, :, 1].squeeze()
      X_librosa = librosa.stft(
          x, n_fft=n_fft, win_length=win_length, hop_length=hop_length
      )
      real_diff, imag_diff = np.allclose(
          X_real.cpu(), X_librosa.real, rtol=1e-3, atol=1e-3
      ), np.allclose(X_imag.cpu(), X_librosa.imag, rtol=1e-3, atol=1e-3)
      assert real_diff and imag_diff
  
file_path: nnAudio/Installation/tests/test_stft.py
imports: import pytest
  import librosa
  import torch
  from scipy.signal import chirp, sweep_poly
  import sys
  from nnAudio.Spectrogram import *
  from parameters import *
  import warnings
label_desc: Use image node_id 4 for calling a global function with example usage: test_stft_complex_winlength(n_fft, win_length, hop_length, device) without return types