code: def _extract_libritts_data(archive_path):
      """Generate partial audio or transcript examples from a LibriTTS archive."""
      for path, contents in tfds.core.download.extractor.iter_tar(
          archive_path
      ):
          if path.endswith(".trans.tsv"):
              for key, example in _generate_transcripts(contents):
                  yield key, example
          elif path.endswith(".wav"):
              key = six.ensure_text(
                  os.path.splitext(os.path.basename(path))[0]
              )
              memfile = io.BytesIO(contents.read())
              example = {"speech": memfile}
              yield key, example
  
file_path: datasets/tensorflow_datasets/datasets/libritts/libritts_dataset_builder.py
imports: from __future__ import annotations
  import io
  import os
  import tarfile
  import numpy
  import six
  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: _extract_libritts_data(archive_path) without return types