docstr: Create common default batch of noise and sinusoids.
docstr_tok: ["Create","common","default","batch","of","noise","and","sinusoids","."]
code: def setUpClass(cls):
      """Create common default batch of noise and sinusoids."""
      super().setUpClass()
      cls.frequency = 440
      cls.sample_rate = 16000
      cls.frame_rate = 250
      cls.batch_size = 2
      cls.audio_len_sec = (
          0.25  # To make tests with f0 CREPE run in shorter time
      )
      cls.amp = 0.8
      cls.batch_of_noise = cls.gen_batch_of_noise(cls.amp)
      cls.batch_of_noise_feats = cls.gen_batch_of_features(
          cls.batch_of_noise
      )
      cls.batch_of_sin = gen_np_batched_sinusoids(
          cls.frequency,
          cls.amp * 0.5,
          cls.sample_rate,
          cls.audio_len_sec,
          cls.batch_size,
      )
      cls.batch_of_sin_feats = cls.gen_batch_of_features(
          cls.batch_of_sin
      )
  
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 1 for calling the MetricsObjectsTest obj's underlying member method code with example usage: obj.setUpClass(cls) without return types