code: def test_read_succeeds_with_valid_sample_size(self):
      callback_fn = self.init_args["callback"]
  
      # Create dummy data to feed to the AudioRecord instance.
      chunk_size = int(_BUFFER_SIZE * 0.5)
      input_data = []
      for _ in range(3):
          dummy_data = np.random.rand(chunk_size, _CHANNELS).astype(
              float
          )
          input_data.append(dummy_data)
          callback_fn(dummy_data)
  
      # Assert read data of a single chunk.
      recorded_audio_data = self.record.read(chunk_size)
      self.assertTrue(
          np.array_equal(recorded_audio_data, input_data[-1])
      )
  
      # Assert read all data in buffer.
      recorded_audio_data = self.record.read(chunk_size * 2)
      print(input_data[-2].shape)
      expected_data = np.concatenate(input_data[-2:])
      self.assertTrue(
          np.array_equal(recorded_audio_data, expected_data)
      )
  
file_path: mediapipe/mediapipe/tasks/python/test/audio/core/audio_record_test.py
imports: import unittest
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from mediapipe.tasks.python.audio.core import audio_record
label_desc: Use image node_id 4 for calling the AudioRecordTest obj's underlying member method code with example usage: obj.test_read_succeeds_with_valid_sample_size() without return types