code: def swallow(text: str, pattern_matcher: re.Pattern) -> str:
      """
      Utility function internal to this module
  
      :param text: text to clean
      :param pattern_matcher: pattern to match
      :return: the text without the matched pattern; spaces are not substituted
      """
      idx_to_omit = []
      for item in pattern_matcher.finditer(text):
          idx_to_omit.insert(0, item.span())
      for start, end in idx_to_omit:
          text = text[:start] + text[end:]
      return text.strip()
  
imports: import re
  from typing import Dict
  from cltk.alphabet.text_normalization import cltk_normalize, remove_odd_punct, split_leading_punct, split_trailing_punct
label_desc: Use image node_id 2 for calling a global function with example usage: swallow(text, pattern_matcher) and returns: text