code: def getoutput(cmd):
      """Return standard output of executing cmd in a shell.
  
      Accepts the same arguments as os.system().
  
      Parameters
      ----------
      cmd : str or list
          A command to be executed in the system shell.
  
      Returns
      -------
      stdout : str
      """
  
      with AvoidUNCPath() as path:
          if path is not None:
              cmd = '"pushd %s &&"%s' % (path, cmd)
          out = process_handler(
              cmd, lambda p: p.communicate()[0], STDOUT
          )
  
      if out is None:
          out = b""
      return py3compat.decode(out)
  
file_path: catboost/contrib/python/ipython/py3/IPython/utils/_process_win32.py
imports: import os
  import sys
  import ctypes
  import time
  from ctypes import c_int, POINTER
  from ctypes.wintypes import LPCWSTR, HLOCAL
  from subprocess import STDOUT, TimeoutExpired
  from threading import Thread
  from ._process_common import read_no_interrupt, process_handler, arg_split
  from .None import py3compat
  from .encoding import DEFAULT_ENCODING
label_desc: Use image node_id 3 for calling a global function with example usage: getoutput(cmd) and returns: py3compat