code: def write_file(name, lines, idx):
      with open(name, "w") as fout:
          for i in idx:
              dic = lines[i]
              json.dump(dic, fout)
              fout.write("\n")
      logging.info("wrote %s", name)
  
file_path: NeMo/scripts/dataset_processing/speaker_tasks/get_hi-mia_data.py
imports: import argparse
  import json
  import logging
  import os
  import tarfile
  import urllib.request
  from glob import glob
  import librosa
  from sklearn.model_selection import StratifiedShuffleSplit
  from tqdm import tqdm
label_desc: Use image node_id 6 for calling a global function with example usage: write_file(name, lines, idx) without return types