code: def escape_ansi(line):
      ansi_escape = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -\/]*[@-~]")
      return ansi_escape.sub("", line)
  
imports: import logging
  import re
  import pytest
  from dvc.parsing import ResolveError
  from dvc.parsing.context import Context
  from dvc.parsing.interpolate import embrace
  from dvc.utils.humanize import join
  from .None import make_entry_definition, make_foreach_def
label_desc: Use image node_id 1 for calling a global function with example usage: escape_ansi(line) and returns: ansi_escape