code: def test_phase_vocoder(self, rate):
      hop_length = 256
      num_freq = 1025
      num_frames = 400
  
      # Due to cummulative sum, numerical error in using torch.float32 will
      # result in bottom right values of the stretched sectrogram to not
      # match with librosa.
      spec = torch.randn(
          num_freq,
          num_frames,
          device=self.device,
          dtype=torch.complex128,
      )
      phase_advance = torch.linspace(
          0,
          np.pi * hop_length,
          num_freq,
          device=self.device,
          dtype=torch.float64,
      )[..., None]
  
      stretched = F.phase_vocoder(
          spec, rate=rate, phase_advance=phase_advance
      )
  
      expected_stretched = librosa.phase_vocoder(
          spec.cpu().numpy(), rate=rate, hop_length=hop_length
      )
  
      self.assertEqual(stretched, torch.from_numpy(expected_stretched))
  
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 FunctionalComplex obj's underlying member method code with example usage: obj.test_phase_vocoder(rate) without return types