code: def getstatusoutput(cmd, *, encoding=None, errors=None):
      """Return (exitcode, output) of executing cmd in a shell.
  
      Execute the string 'cmd' in a shell with 'check_output' and
      return a 2-tuple (status, output). The locale encoding is used
      to decode the output and process newlines.
  
      A trailing newline is stripped from the output.
      The exit status for the command can be interpreted
      according to the rules for the function 'wait'. Example:
  
      >>> import subprocess
      >>> subprocess.getstatusoutput('ls /bin/ls')
      (0, '/bin/ls')
      >>> subprocess.getstatusoutput('cat /bin/junk')
      (1, 'cat: /bin/junk: No such file or directory')
      >>> subprocess.getstatusoutput('/bin/junk')
      (127, 'sh: /bin/junk: not found')
      >>> subprocess.getstatusoutput('/bin/kill $$')
      (-15, '')
      """
      try:
          data = check_output(
              cmd,
              shell=True,
              text=True,
              stderr=STDOUT,
              encoding=encoding,
              errors=errors,
          )
          exitcode = 0
      except CalledProcessError as ex:
          data = ex.output
          exitcode = ex.returncode
      if data[-1:] == "\n":
          data = data[:-1]
      return exitcode, data
  
imports: import builtins
  import errno
  import io
  import locale
  import os
  import time
  import signal
  import sys
  import threading
  import warnings
  import contextlib
  from time import monotonic
  import types
label_desc: Use image node_id 9 for calling a global function with example usage: getstatusoutput(cmd) and returns: exitcode,  data