docstr: Tests the finite difference function.
docstr_tok: ["Tests","the","finite","difference","function","."]
code: def test_equivalent_with_librosa(self, range_db):
      """Tests the finite difference function."""
      x = tf.sin(tf.linspace(0.0, 100 * np.pi, 16000)) ** 2.0
  
      # Amplitude.
      librosa_db = librosa.amplitude_to_db(x, top_db=range_db)
      ddsp_db = core.amplitude_to_db(x, range_db=range_db)
      self.assertAllClose(librosa_db, ddsp_db, rtol=1e-6, atol=1e-6)
  
      # Back to linear.
      librosa_x = librosa.db_to_amplitude(librosa_db)
      ddsp_x = core.db_to_amplitude(ddsp_db)
      self.assertAllClose(librosa_x, ddsp_x, rtol=1e-6, atol=1e-6)
  
      # Power.
      librosa_power_db = librosa.power_to_db(x, top_db=range_db)
      ddsp_power_db = core.power_to_db(x, range_db=range_db)
      self.assertAllClose(
          librosa_power_db, ddsp_power_db, rtol=1e-6, atol=1e-6
      )
  
      # Back to linear.
      librosa_power_x = librosa.db_to_power(librosa_power_db)
      ddsp_power_x = core.db_to_power(ddsp_power_db)
      self.assertAllClose(
          librosa_power_x, ddsp_power_x, rtol=1e-6, atol=1e-6
      )
  
imports: from absl.testing import parameterized
  from ddsp import core
  import librosa
  import numpy
  from scipy import signal
  import tensorflow.compat.v2
label_desc: Use image node_id 1 for calling the DecibelsConversionTest obj's underlying member method code with example usage: obj.test_equivalent_with_librosa(range_db) without return types