def METHOD_NAME(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))