code: def run_capture_output(*args, **kw):
      args, cwd, env = _popen_args(*args, **kw)
      p = subprocess.Popen(
          args,
          cwd=cwd,
          env=env,
          stdout=subprocess.PIPE,
          stderr=subprocess.STDOUT,
      )
      out, _err = p.communicate()
      out = out.decode()
      if p.returncode != 0:
          raise RunError((args, cwd, env), p.returncode, out)
      return out
  
imports: import os
  import subprocess
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: run_capture_output() and returns: out