code: def _read_output(commandstring, capture_stderr=False):
      """Output from successful command execution or None"""
      # Similar to os.popen(commandstring, "r").read(),
      # but without actually using os.popen because that
      # function is not usable during python bootstrap.
      # tempfile is also not available then.
      import contextlib
  
      try:
          import tempfile
  
          fp = tempfile.NamedTemporaryFile()
      except ImportError:
          fp = open("/tmp/_osx_support.%s" % (os.getpid(),), "w+b")
  
      with contextlib.closing(fp) as fp:
          if capture_stderr:
              cmd = "%s >'%s' 2>&1" % (commandstring, fp.name)
          else:
              cmd = "%s 2>/dev/null >'%s'" % (commandstring, fp.name)
          return (
              fp.read().decode("utf-8").strip()
              if not os.system(cmd)
              else None
          )
  
imports: import os
  import re
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: _read_output(commandstring, capture_stderr) and returns: unknown