code: def help_output_test(subcommand=""):
      """test that `ipython [subcommand] -h` works"""
      cmd = get_ipython_cmd() + [subcommand, "-h"]
      out, err, rc = get_output_error_code(cmd)
      nt.assert_equal(rc, 0, err)
      nt.assert_not_in("Traceback", err)
      nt.assert_in("Options", out)
      nt.assert_in("--help-all", out)
      return out, err
  
imports: from __future__ import absolute_import
  import os
  import re
  import sys
  import tempfile
  from contextlib import contextmanager
  from io import StringIO
  from subprocess import Popen, PIPE
  from traitlets.config.loader import Config
  from IPython.utils.process import get_output_error_code
  from IPython.utils.text import list_strings
  from IPython.utils.io import temp_pyfile, Tee
  from IPython.utils import py3compat
  from IPython.utils.encoding import DEFAULT_ENCODING
  from .None import decorators
  from .None import skipdoctest
label_desc: Use image node_id 12 for calling a global function with example usage: help_output_test(subcommand) and returns: out,  err