code: def run_shell(cmd, allow_non_zero=False, stderr=None):
      if stderr is None:
          stderr = sys.stdout
      if allow_non_zero:
          try:
              output = subprocess.check_output(cmd, stderr=stderr)
          except subprocess.CalledProcessError as e:
              output = e.output
      else:
          output = subprocess.check_output(cmd, stderr=stderr)
      return output.decode("UTF-8").strip()
  
imports: import argparse
  import os
  import pathlib
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 9 for calling a global function with example usage: run_shell(cmd, allow_non_zero, stderr) and returns: output