code: def get_output_error_code(cmd):
      """Return (standard output, standard error, return code) 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
      stderr : str
      returncode: int
      """
  
      out_err, p = process_handler(cmd, lambda p: (p.communicate(), p))
      if out_err is None:
          return "", "", p.returncode
      out, err = out_err
      return (
          py3compat.bytes_to_str(out),
          py3compat.bytes_to_str(err),
          p.returncode,
      )
  
file_path: catboost/contrib/python/ipython/py2/IPython/utils/_process_common.py
imports: import subprocess
  import shlex
  import sys
  import os
  from IPython.utils import py3compat
label_desc: Use image node_id 5 for calling a global function with example usage: get_output_error_code(cmd) and returns: py3compat,  py3compat,  p, str,  str,  p