code: def testDataCollection(self):
      # Generate a trivial source and target file.
      tmp_dir = self.get_temp_dir()
      test_files = [
          "dir1/file1",
          "dir1/file2",
          "dir1/dir2/file3",
          "dir1/dir2/dir3/file4",
      ]
      for filename in test_files:
          input_filename = os.path.join(tmp_dir, filename + ".WAV")
          target_filename = os.path.join(tmp_dir, filename + ".WRD")
          directories = os.path.dirname(input_filename)
          if not os.path.exists(directories):
              os.makedirs(directories)
          io.open(input_filename, "wb")
          io.open(target_filename, "wb")
  
      data_dict = audio._collect_data(tmp_dir, ".WAV", ".WRD")
      expected = [
          os.path.join(tmp_dir, filename) for filename in test_files
      ]
      self.assertEqual(sorted(list(data_dict)), sorted(expected))
  
      # Clean up.
      for filename in test_files:
          os.remove(os.path.join(tmp_dir, "%s.WAV" % filename))
          os.remove(os.path.join(tmp_dir, "%s.WRD" % filename))
  
file_path: tensor2tensor/tensor2tensor/data_generators/audio_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import io
  import os
  from tensor2tensor.data_generators import audio
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the AudioTest obj's underlying member method code with example usage: obj.testDataCollection() without return types