code: def xsys(self, cmd):
      """Replace the default system call with a capturing one for doctest."""
      # We use getoutput, but we need to strip it because pexpect captures
      # the trailing newline differently from commands.getoutput
      print(
          self.getoutput(cmd, split=False, depth=1).rstrip(),
          end="",
          file=sys.stdout,
      )
      sys.stdout.flush()
  
file_path: catboost/contrib/python/ipython/py3/IPython/testing/globalipapp.py
imports: import builtins
  import sys
  import types
  from pathlib import Path
  from .None import tools
  from IPython.core import page
  from IPython.utils import io
  from IPython.terminal.interactiveshell import TerminalInteractiveShell
label_desc: Use image node_id 2 for calling a global function with example usage: xsys(cmd) without return types