code: def convert_cmu_arpabet_to_ipa(
      arp_ipa_map_file: str, arp_dict_file: str, output_ipa_file: str
  ):
      """
      Converts CMU ARPABET-based dictionary to IPA.
  
      Args:
          arp_ipa_map_file: ARPABET to IPA phoneme mapping file
          arp_dict_file: path to ARPABET version of CMU dictionary
          output_ipa_file: path to output IPA version of CMU dictionary
      """
      arp_to_ipa_dict = _get_arpabet_to_ipa_mapping(arp_ipa_map_file)
      with open(arp_dict_file, "r", encoding="utf-8") as f_arp, open(
          output_ipa_file, "w", encoding="utf-8"
      ) as f_ipa:
          for line in f_arp:
              if line.startswith(";;;"):
                  f_ipa.write(line)
              else:
                  # First, split the line at " #" if there are comments in the dictionary file following the mapping entries.
                  # Next, split at default "  " separator.
                  graphemes, phonemes = (
                      line.split(" #")[0].strip().split("  ")
                  )
                  ipa_form = convert_arp_to_ipa(
                      arp_to_ipa_dict, phonemes, remove_space=True
                  )
                  f_ipa.write(f"{graphemes}  {ipa_form}\n")
  
      print(
          f"IPA version of {os.path.abspath(arp_dict_file)} saved in {os.path.abspath(output_ipa_file)}"
      )
  
file_path: NeMo/scripts/dataset_processing/g2p/convert_cmu_arpabet_to_ipa.py
imports: import itertools
  import os
  from argparse import ArgumentParser
  from typing import Dict
  from syllabify import syllabify
label_desc: Use image node_id 4 for calling a global function with example usage: convert_cmu_arpabet_to_ipa(arp_ipa_map_file, arp_dict_file, output_ipa_file) without return types