class_docstr: Test suite for functions in `functional` module.
code: def test_griffinlim(self, momentum):
      # FFT params
      n_fft = 400
      win_length = n_fft
      hop_length = n_fft // 4
      window = torch.hann_window(win_length, device=self.device)
      power = 1
      # GriffinLim params
      n_iter = 8
  
      waveform = get_whitenoise(device=self.device, dtype=self.dtype)
      specgram = get_spectrogram(
          waveform,
          n_fft=n_fft,
          hop_length=hop_length,
          power=power,
          win_length=win_length,
          window=window,
      )
  
      result = F.griffinlim(
          specgram,
          window=window,
          n_fft=n_fft,
          hop_length=hop_length,
          win_length=win_length,
          power=power,
          n_iter=n_iter,
          momentum=momentum,
          length=waveform.size(1),
          rand_init=False,
      )
      expected = librosa.griffinlim(
          specgram[0].cpu().numpy(),
          n_iter=n_iter,
          hop_length=hop_length,
          momentum=momentum,
          init=None,
          length=waveform.size(1),
          pad_mode="reflect",
      )[None, ...]
      self.assertEqual(
          result, torch.from_numpy(expected), atol=5e-5, rtol=1e-07
      )
  
file_path: audio/test/torchaudio_unittest/functional/librosa_compatibility_test_impl.py
imports: import unittest
  from distutils.version import StrictVersion
  import torch
  import torchaudio.functional
  from parameterized import param
  from torchaudio._internal.module_utils import is_module_available
  from torchaudio_unittest.common_utils import get_spectrogram, get_whitenoise, nested_params, TestBaseMixin
label_desc: Use image node_id 1 for calling the Functional obj's underlying member method code with example usage: obj.test_griffinlim(momentum) without return types