code: def strip_ansi(source):
      """
      Remove ansi escape codes from text.
  
      Parameters
      ----------
      source : str
          Source to remove the ansi from
      """
      warnings.warn(
          "`strip_ansi` is Pending Deprecation since IPython 8.17."
          "It is considered fro removal in in future version. "
          "Please open an issue if you believe it should be kept.",
          stacklevel=2,
          category=PendingDeprecationWarning,
      )
  
      return re.sub(r"\033\[(\d|;)+?m", "", source)
  
imports: import os
  import re
  import string
  import sys
  import textwrap
  import warnings
  from string import Formatter
  from pathlib import Path
  from typing import List, Union, Optional, Dict, Tuple
label_desc: Use image node_id 9 for calling a global function with example usage: strip_ansi(source) and returns: re