code: def __init__(
      self,
      granularity: str,
      aug_min: int,
      aug_max: int,
      aug_p: float,
      vary_fonts: bool,
      fonts_path: str,
      priority_words: Optional[List[str]],
  ):
      assert granularity in [
          "char",
          "word",
          "all",
      ], "Granularity must be either char, word, or all"
      assert (
          0 <= aug_min <= aug_max
      ), "aug_min must be non-negative and aug_max must be greater than or equal to aug_min"
      assert (
          0 <= aug_p <= 1
      ), "aug_p must be a value in the range [0, 1]"
  
      super().__init__(
          name="FunFontsAugmenter",
          action=Action.SUBSTITUTE,
          method=Method.WORD,
          aug_min=aug_min,
          aug_max=aug_max,
          aug_p=aug_p,
      )
      self.fonts = self.load_fonts(fonts_path)
      self.aug_p = aug_p
      self.granularity = granularity
      self.vary_fonts = vary_fonts
      self.priority_words = (
          set(priority_words)
          if priority_words is not None
          else priority_words
      )
  
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 1 to create a new FunFontsAugmenter object from inherited base classes: Augmenter with example: obj = FunFontsAugmenter(granularity, aug_min, aug_max, aug_p, vary_fonts, fonts_path, priority_words)