code: def g2p(text, trans_type="char"):
      text = jaconv.normalize(text)
      if trans_type == "char":
          text = pyopenjtalk.g2p(text, kana=True)
      elif trans_type == "phn":
          text = pyopenjtalk.g2p(text, kana=False)
      else:
          assert False
      return text
  
imports: import argparse
  import codecs
  import jaconv
  import pyopenjtalk
label_desc: Use image node_id 1 for calling a global function with example usage: g2p(text, trans_type) and returns: text