code: def run(command):
      """Return (return-code, stdout, stderr)."""
      shell = True if type(command) is str else False
      p = subprocess.Popen(
          command,
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE,
          shell=shell,
      )
      raw_output, raw_err = p.communicate()
      rc = p.returncode
      if get_platform() == "win32":
          enc = "oem"
      else:
          enc = locale.getpreferredencoding()
      output = raw_output.decode(enc)
      err = raw_err.decode(enc)
      return rc, output.strip(), err.strip()
  
imports: import datetime
  import locale
  import re
  import subprocess
  import sys
  import os
  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