code: def testAudioSummary(self):
      np.random.seed(7)
      for channels in (1, 2, 5, 8):
          with self.session(graph=ops.Graph()) as sess:
              num_frames = 7
              shape = (4, num_frames, channels)
              # Generate random audio in the range [-1.0, 1.0).
              const = 2.0 * np.random.random(shape) - 1.0
  
              # Summarize
              sample_rate = 8000
              summ = summary.audio(
                  "snd", const, max_outputs=3, sample_rate=sample_rate
              )
              value = self.evaluate(summ)
              self.assertEqual([], summ.get_shape())
              audio_summ = self._AsSummary(value)
  
              # Check the rest of the proto
              self._CheckProto(
                  audio_summ, sample_rate, channels, num_frames
              )
  
file_path: tensorflow-upstream/tensorflow/python/kernel_tests/summary_ops/summary_v1_audio_op_test.py
imports: import numpy
  from tensorflow.core.framework import summary_pb2
  from tensorflow.python.framework import ops
  from tensorflow.python.platform import test
  from tensorflow.python.summary import summary
label_desc: Use image node_id 3 for calling the SummaryV1AudioOpTest obj's underlying member method code with example usage: obj.testAudioSummary() without return types