class_docstr: Augmenter that replaces words based on a given mapping
code: def get_mapping(
      self, mapping: Optional[Union[str, Dict[str, Any]]]
  ) -> WordReplacement:
      return WordReplacement(mapping)
  
file_path: AugLy/augly/text/augmenters/word_replacement.py
imports: import json
  from typing import Any, Dict, List, Optional, Tuple, 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.augmenter.word import WordAugmenter
  from nlpaug.util import Action, Method
label_desc: Use image node_id 2 for calling the WordReplacementAugmenter obj's underlying member method code with example usage: obj.get_mapping(mapping) and returns: WordReplacement