code: def run(command):
      """Returns (return-code, stdout, stderr)"""
      p = subprocess.Popen(
          command,
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE,
          shell=True,
      )
      output, err = p.communicate()
      rc = p.returncode
      if PY3:
          enc = locale.getpreferredencoding()
          output = output.decode(enc)
          err = err.decode(enc)
      return rc, output.strip(), err.strip()
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import locale
  import os
  import re
  import subprocess
  import sys
  from collections import namedtuple
label_desc: Use image node_id 1 for calling a global function with example usage: run(command) and returns: rc,  output,  err