code: def replace_symbol(text, replacement_text="", is_replace_consecutive_chars=False, is_strip=False):
      
  
      try:
          new_text = __RE_SYMBOL.sub(replacement_text, preprocess(text))
      except (TypeError, AttributeError):
          raise TypeError("text must be a string")
  
      if not replacement_text:
          return new_text
  
      if is_replace_consecutive_chars:
          new_text = re.sub("{}+".format(re.escape(replacement_text)), replacement_text, new_text)
  
      if is_strip:
          new_text = new_text.strip(replacement_text)
  
      return new_text
docs: Replace all of the symbols in the ``text``.
  
      :param str text: Input text.
      :param str replacement_text: Replacement text.
      :return: A replacement string.
      :rtype: str
  
      :Examples:
  
          :ref:`example-sanitize-symbol`