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 os
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 12 for calling a global function with example usage: run_shell(cmd, allow_non_zero, stderr) and returns: output