code: def prepare_utt2spk_spk2utt(output_dir, split_ids, ids_to_skip=[]):
      """Create (dummy) utt2spk and spk2utt files to satisfy Kaldi format
  
      Parameters
      ----------
      output_dir : str
          The folder path for output, e.g. data/
      split_ids : list of str
          a list of example ids to process, e.g. train/valid/test splits
      ids_to_skip : list of str
          A list of ids to exclude from the output,
          e.g. to ignore previously skipped ids due to empty transcript
      """
      output_lines = [
          f"{x} {x}\n" for x in split_ids if x not in ids_to_skip
      ]
      output_lines.sort()
  
      with open(os.path.join(output_dir, "utt2spk"), "w") as out_file:
          out_file.writelines(output_lines)
  
      with open(os.path.join(output_dir, "spk2utt"), "w") as out_file:
          out_file.writelines(output_lines)
  
file_path: espnet/egs2/iam/ocr1/local/data_prep.py
imports: import argparse
  import os
  import numpy
  from PIL import Image
  from espnet.utils.cli_writers import file_writer_helper
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_utt2spk_spk2utt(output_dir, split_ids, ids_to_skip) without return types