code: def prepare_annotation(src, destination_file_name, phonemes):
      """Prepares the annotation file
  
      Arguments
      ---------
      src: datasets.arrow_dataset.Dataset
          the source dataset
      destination_file_name: str
          the path to the annotation file to be created
      phonemes: list
          the list of phonemes
      """
      phoneme_map = build_token_char_map(phonemes)
      annotation = {
          item["sample_id"]: {
              "char": item["char"],
              "phn": phn2txt(item["phn"], phoneme_map),
          }
          for item in src
      }
      with open(destination_file_name, "w") as dst_file:
          json.dump(annotation, dst_file, indent=2)
  
imports: import json
  import os
  import re
  import datasets
  from speechbrain.lobes.models.g2p.dataio import build_token_char_map
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_annotation(src, destination_file_name, phonemes) without return types