code: def _maybe_convert_set(extracted_dir, source_csv, target_csv):
      print()
      if os.path.exists(target_csv):
          print(
              'Found CSV file "%s" - not importing "%s".'
              % (target_csv, source_csv)
          )
          return
      print(
          'No CSV file "%s" - importing "%s"...'
          % (target_csv, source_csv)
      )
      samples = []
      with open(source_csv) as source_csv_file:
          reader = csv.DictReader(source_csv_file)
          for row in reader:
              samples.append(
                  (
                      os.path.join(extracted_dir, row["filename"]),
                      row["text"],
                  )
              )
  
      # Mutable counters for the concurrent embedded routine
      counter = get_counter()
      num_samples = len(samples)
      rows = []
  
      print("Importing mp3 files...")
      pool = Pool()
      bar = progressbar.ProgressBar(
          max_value=num_samples, widgets=SIMPLE_BAR
      )
      for i, processed in enumerate(
          pool.imap_unordered(one_sample, samples), start=1
      ):
          counter += processed[0]
          rows += processed[1]
          bar.update(i)
      bar.update(num_samples)
      pool.close()
      pool.join()
  
      print('Writing "%s"...' % target_csv)
      with open(
          target_csv, "w", encoding="utf-8", newline=""
      ) as target_csv_file:
          writer = csv.DictWriter(
              target_csv_file, fieldnames=FIELDNAMES
          )
          writer.writeheader()
          bar = progressbar.ProgressBar(
              max_value=len(rows), widgets=SIMPLE_BAR
          )
          for filename, file_size, transcript in bar(rows):
              writer.writerow(
                  {
                      "wav_filename": filename,
                      "wav_filesize": file_size,
                      "transcript": transcript,
                  }
              )
  
      imported_samples = get_imported_samples(counter)
      assert counter["all"] == num_samples
      assert len(rows) == imported_samples
  
      print_import_report(counter, SAMPLE_RATE, MAX_SECS)
  
file_path: DeepSpeech/bin/import_cv.py
imports: import csv
  import os
  import sys
  import subprocess
  import tarfile
  from glob import glob
  from multiprocessing import Pool
  import progressbar
  import sox
  from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
  from deepspeech_training.util.importers import get_counter, get_imported_samples, print_import_report
  from deepspeech_training.util.importers import validate_label_eng
label_desc: Use image node_id 5 for calling a global function with example usage: _maybe_convert_set(extracted_dir, source_csv, target_csv) without return types