code: def phn2txt(phn, phoneme_map):
      """Encodes phonemes using a character map for use with SentencePiece
  
      Arguments
      ---------
      phn: list
          a list of original phonemes (ARPABET)
      phoneme_map
          the phoneme-to-character map
  
      Returns
      -------
      value: str
          the mapped string representation
      """
      value = "".join(phoneme_map[phoneme] for phoneme in phn).strip()
      value = MULTI_SPACE.sub("", value)
      return value
  
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 1 for calling a global function with example usage: phn2txt(phn, phoneme_map) and returns: value