code: def run_shell(cmd, allow_non_zero=False, stderr=None):
      """Get var_name either from env, or user or default.
  
      Args:
        cmd: copy of the os.environ.
        allow_non_zero: string for name of environment variable, e.g. "TF_NEED
        stderr: string for how to ask for user input.
  
      Returns:
        string value output of the command executed.
      """
      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()
  
file_path: launchpad/configure.py
imports: import argparse
  import os
  import subprocess
  import sys
label_desc: Use image node_id 6 for calling a global function with example usage: run_shell(cmd, allow_non_zero, stderr) and returns: output