code: def write_train_val_test_dataset_to_file(
      file_name,
      folder_name,
      output_folder,
      detokenizer,
      split,
      remove_newlines,
  ):
      ds = tf.data.TFRecordDataset(tf.io.gfile.glob([file_name]))
      fdict = _TASK_SPLITS_AND_FEATURES_DICT[folder_name][
          "features_dict"
      ]
      feature_description = {
          feat: _feature_config(**desc) for feat, desc in fdict.items()
      }
      ds = ds.map(
          lambda pb: tf.io.parse_single_example(
              pb, feature_description
          ),
          num_parallel_calls=tf.data.experimental.AUTOTUNE,
      )
      ds = ds.map(
          lambda x: {
              k: tf.cast(v, fdict[k]["dtype"]) for k, v in x.items()
          },
          num_parallel_calls=tf.data.experimental.AUTOTUNE,
      )
      write_dataset_to_file(
          ds,
          os.path.join(output_folder, split, folder_name + ".jsonl"),
          detokenizer,
          remove_newlines,
      )
  
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 4 for calling a global function with example usage: write_train_val_test_dataset_to_file(file_name, folder_name, output_folder, detokenizer, split, remove_newlines) without return types