code: def test_Spectrogram(self, n_fft, hop_length, power):
      sample_rate = 16000
      waveform = get_whitenoise(
          sample_rate=sample_rate,
          n_channels=1,
      ).to(self.device, self.dtype)
  
      expected = librosa.core.spectrum._spectrogram(
          y=waveform[0].cpu().numpy(),
          n_fft=n_fft,
          hop_length=hop_length,
          power=power,
          pad_mode="reflect",
      )[0]
  
      result = T.Spectrogram(
          n_fft=n_fft,
          hop_length=hop_length,
          power=power,
      ).to(self.device, self.dtype)(waveform)[0]
      self.assertEqual(
          result, torch.from_numpy(expected), atol=1e-4, rtol=1e-4
      )
  
file_path: audio/test/torchaudio_unittest/transforms/librosa_compatibility_test_impl.py
imports: import unittest
  import torch
  import torchaudio.transforms
  from parameterized import param, parameterized
  from torchaudio._internal.module_utils import is_module_available
  from torchaudio_unittest.common_utils import get_sinusoid, get_spectrogram, get_whitenoise, nested_params, TestBaseMixin
label_desc: Use image node_id 1 for calling the TransformsTestBase obj's underlying member method code with example usage: obj.test_Spectrogram(n_fft, hop_length, power) without return types