code: def strip_ansi(source):
      """
      Remove ansi escape codes from text.
  
      Parameters
      ----------
      source : str
          Source to remove the ansi from
      """
      return re.sub(r"\033\[(\d|;)+?m", "", source)
  
file_path: catboost/contrib/python/ipython-genutils/py2/ipython_genutils/text.py
imports: import os
  import re
  import sys
  import textwrap
  from string import Formatter
label_desc: Use image node_id 4 for calling a global function with example usage: strip_ansi(source) and returns: re