code: def _generate_userlibri_audio_examples(user_directory):
      """Generate audio examples from a UserLibri directory."""
      transcripts_glob = os.path.join(user_directory, "*.txt")
      for transcript_file in tf.io.gfile.glob(transcripts_glob):
          with tf.io.gfile.GFile(
              os.path.join(user_directory, transcript_file)
          ) as f:
              for line in f:
                  line = line.strip()
                  key, transcript = line.split(" ", 1)
                  audio_file = f"{key}.flac"
                  user_id = user_directory.split("/")[-1]
                  _, speaker_id, _, book_id = user_id.split("-")
                  example = {
                      "id": key,
                      "user_id": user_id,
                      "speaker_id": speaker_id,
                      "book_id": book_id,
                      "audio": os.path.join(user_directory, audio_file),
                      "transcript": transcript,
                  }
                  yield key, example
  
file_path: datasets/tensorflow_datasets/audio/userlibri_audio_data/userlibri_audio_data.py
imports: import csv
  import os
  from etils import epath
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling a global function with example usage: _generate_userlibri_audio_examples(user_directory) without return types