code: def testSpectrogramToMelMatrixChecksFrequencyBounds(self):
      # Lower edge must be >= 0, but 0 is OK.
      mfcc_mel.SpectrogramToMelMatrix(
          num_spectrogram_bins=513,
          audio_sample_rate=22050,
          num_mel_bins=20,
          lower_edge_hertz=0.0,
          upper_edge_hertz=4000.0,
      )
      with self.assertRaises(ValueError):
          mfcc_mel.SpectrogramToMelMatrix(
              num_spectrogram_bins=513,
              audio_sample_rate=22050,
              num_mel_bins=20,
              lower_edge_hertz=-1.0,
              upper_edge_hertz=4000.0,
          )
      # Upper edge must be <= Nyquist, but Nyquist is OK.
      mfcc_mel.SpectrogramToMelMatrix(
          num_spectrogram_bins=513,
          audio_sample_rate=22050,
          num_mel_bins=20,
          lower_edge_hertz=20.0,
          upper_edge_hertz=11025.0,
      )
      with self.assertRaises(ValueError):
          mfcc_mel.SpectrogramToMelMatrix(
              num_spectrogram_bins=513,
              audio_sample_rate=22050,
              num_mel_bins=20,
              lower_edge_hertz=20.0,
              upper_edge_hertz=16000.0,
          )
      # Must be a positive gap between edges.
      with self.assertRaises(ValueError):
          mfcc_mel.SpectrogramToMelMatrix(
              num_spectrogram_bins=513,
              audio_sample_rate=22050,
              num_mel_bins=20,
              lower_edge_hertz=20.0,
              upper_edge_hertz=20.0,
          )
  
imports: from absl.testing import absltest
  from magenta.models.onsets_frames_transcription import mfcc_mel
  import numpy
label_desc: Use image node_id 2 for calling the MfccMelTest obj's underlying member method code with example usage: obj.testSpectrogramToMelMatrixChecksFrequencyBounds() without return types