code: def check_help_output(pkg, subcommand=None):
      """test that `python -m PKG [subcommand] -h` works"""
      cmd = [sys.executable, "-m", pkg]
      if subcommand:
          cmd.extend(subcommand)
      cmd.append("-h")
      out, err, rc = get_output_error_code(cmd)
      assert rc == 0, err
      assert "Traceback" not in err
      assert "Options" in out
      assert "--help-all" in out
      return out, err
  
imports: import sys
  from subprocess import Popen, PIPE
label_desc: Use image node_id 2 for calling a global function with example usage: check_help_output(pkg, subcommand) and returns: out,  err