code: def test_loudness_metrics_has_expected_values(self):
      loudness_metrics = ddsp_metrics.LoudnessMetrics(
          self.sample_rate, self.frame_rate
      )
      # Dummy batch 1: known noise features vs. known noise audio.
      # Since audio is the same, loudness distance should be 0.
      loudness_metrics.update_state(
          self.batch_of_noise_feats, self.batch_of_noise
      )
      self.assertAllClose(
          loudness_metrics.metrics["loudness_db"].result(), 0
      )
  
      # Dummy batch 2: known noise features vs. quiet batch of sin audio
      # Since audio is different, loudness distance should greater than 0.
      loudness_metrics.update_state(
          self.batch_of_noise_feats, self.batch_of_sin
      )
      self.assertGreater(
          loudness_metrics.metrics["loudness_db"].result(), 0
      )
  
      loudness_metrics.flush(step=1)
  
imports: from unittest import mock
  from absl.testing import parameterized
  import ddsp
  from ddsp.test_util import gen_np_batched_sinusoids
  from ddsp.test_util import gen_np_sinusoid
  import ddsp.training.metrics
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 4 for calling the MetricsObjectsTest obj's underlying member method code with example usage: obj.test_loudness_metrics_has_expected_values() without return types