code: def _collect_data(directory):
      """Traverses directory collecting input and target files.
  
      Args:
       directory: base path to extracted audio and transcripts.
      Returns:
       list of (media_base, media_filepath, label) tuples
      """
      # Returns:
      data_files = []
      transcripts = [
          filename
          for filename in os.listdir(directory)
          if filename.endswith(".csv")
      ]
      for transcript in transcripts:
          transcript_path = os.path.join(directory, transcript)
          with open(transcript_path, "r") as transcript_file:
              transcript_reader = csv.reader(transcript_file)
              # skip header
              _ = next(transcript_reader)
              for transcript_line in transcript_reader:
                  media_name, label = transcript_line[0:2]
                  filename = os.path.join(directory, media_name)
                  data_files.append((media_name, filename, label))
      return data_files
  
imports: import csv
  import os
  import tarfile
  from tensorflow.compat.v1 import estimator
  import tqdm
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import speech_recognition
  from tensor2tensor.utils import registry
label_desc: Use image node_id 1 for calling a global function with example usage: _collect_data(directory) and returns: data_files