code: def write_general_csv(target_dir, _rows, _counter):
      target_csv_template = os.path.join(target_dir, "ccpmf_{}.csv")
      with open(
          target_csv_template.format("train"), "w"
      ) as train_csv_file:  # 80%
          with open(
              target_csv_template.format("dev"), "w"
          ) as dev_csv_file:  # 10%
              with open(
                  target_csv_template.format("test"), "w"
              ) as test_csv_file:  # 10%
                  train_writer = csv.DictWriter(
                      train_csv_file, fieldnames=FIELDNAMES
                  )
                  train_writer.writeheader()
                  dev_writer = csv.DictWriter(
                      dev_csv_file, fieldnames=FIELDNAMES
                  )
                  dev_writer.writeheader()
                  test_writer = csv.DictWriter(
                      test_csv_file, fieldnames=FIELDNAMES
                  )
                  test_writer.writeheader()
  
                  bar = progressbar.ProgressBar(
                      max_value=len(_rows), widgets=SIMPLE_BAR
                  )
                  for i, item in enumerate(bar(_rows)):
                      i_mod = i % 10
                      if i_mod == 0:
                          writer = test_writer
                      elif i_mod == 1:
                          writer = dev_writer
                      else:
                          writer = train_writer
                      writer.writerow(
                          {
                              "wav_filename": item[0],
                              "wav_filesize": item[1],
                              "transcript": item[2],
                          }
                      )
  
      print("")
      print("~~~~ FINAL STATISTICS ~~~~")
      print_import_report(_counter, SAMPLE_RATE, MAX_SECS)
      print("~~~~ (FINAL STATISTICS) ~~~~")
      print("")
  
imports: import csv
  import sys
  import os
  import progressbar
  import subprocess
  import zipfile
  from glob import glob
  from multiprocessing import Pool
  import hashlib
  import decimal
  import math
  import unicodedata
  import re
  import sox
  import xml.etree.ElementTree
  import requests
  import json
  from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
  from deepspeech_training.util.helpers import secs_to_hours
  from deepspeech_training.util.importers import get_counter, get_importers_parser, get_imported_samples, get_validate_label, print_import_report
  from ds_ctcdecoder import Alphabet
label_desc: Use image node_id 11 for calling a global function with example usage: write_general_csv(target_dir, _rows, _counter) without return types