code: def process_all_folders(data_folder, output_folder, remove_newlines):
      detokenizer = MosesDetokenizer("en")
      assert os.path.isdir(data_folder)
      if not os.path.exists(output_folder):
          os.system(f"mkdir -p {output_folder}")
      if not os.path.exists(os.path.join(output_folder, "train")):
          os.system(f'mkdir -p {os.path.join(output_folder, "train")}')
      if not os.path.exists(os.path.join(output_folder, "val")):
          os.system(f'mkdir -p {os.path.join(output_folder, "val")}')
      if not os.path.exists(os.path.join(output_folder, "test")):
          os.system(f'mkdir -p {os.path.join(output_folder, "test")}')
  
      print(
          f"Found {len(os.listdir(data_folder))} folders to process ..."
      )
      pool_args = []
      for folder_name in os.listdir(data_folder):
          pool_args.append(
              (
                  data_folder,
                  folder_name,
                  output_folder,
                  detokenizer,
                  remove_newlines,
              )
          )
      pool = Pool()
      pool.starmap(process_folder, pool_args)
  
file_path: NeMo/scripts/nlp_language_modeling/t0/t0_dataset_preproc.py
imports: import json
  import os
  import re
  from argparse import ArgumentParser
  from multiprocessing import Pool
  import tensorflow
  from sacremoses import MosesDetokenizer
  from tasks_splits_and_features import _TASK_SPLITS_AND_FEATURES_DICT
label_desc: Use image node_id 6 for calling a global function with example usage: process_all_folders(data_folder, output_folder, remove_newlines) without return types