code: def apply_font(
      self, text: str, font: Union[str, dict], method: str
  ) -> str:
      assert (
          method in Method.getall()
      ), "Expected 'method' to be a value defined in nlpaug.util.method.Method"
  
      if isinstance(font, str):
          return (
              font.join(text) + font
              if method == Method.WORD
              else text + font
          )
  
      if isinstance(font, dict):
          return (
              "".join([font.get(char, char) for char in text])
              if method == Method.WORD
              else font.get(text, text)
          )
  
file_path: AugLy/augly/text/augmenters/fun_fonts.py
imports: import json
  import random
  from typing import List, Optional, Union
  from augly.text.augmenters.utils import detokenize, get_aug_idxes, tokenize
  from augly.utils import pathmgr
  from augly.utils.libsndfile import install_libsndfile
  from nlpaug import Augmenter
  from nlpaug.util import Action, Method
label_desc: Use image node_id 5 for calling the FunFontsAugmenter obj's underlying member method code with example usage: obj.apply_font(text, font, method) and returns: unknown, unknown