code: def write_file(name, lines, idx):
      with open(name, "w", encoding="utf-8") as fout:
          for i in idx:
              dic = lines[i]
              json.dump(dic, fout)
              fout.write("\n")
      print("wrote", name)
  
file_path: NeMo/scripts/speaker_tasks/filelist_to_manifest.py
imports: import argparse
  import json
  import os
  import random
  import librosa
  import numpy
  import soundfile
  import sox
  from sklearn.model_selection import StratifiedShuffleSplit
  from tqdm.contrib.concurrent import process_map
  from nemo.collections.asr.parts.utils.manifest_utils import read_manifest
label_desc: Use image node_id 3 for calling a global function with example usage: write_file(name, lines, idx) without return types