code: def test_main_returns_0_on_help(self):
      with pytest.raises(SystemExit) as cm:
          with capture_sys_output() as (stdout, stderr):
              nipype_cmd.main(["nipype_cmd", "-h"])
  
      exit_exception = cm.value
      assert exit_exception.code == 0
  
      assert stderr.getvalue() == ""
      if sys.version_info >= (3, 10):
          options = "options"
      else:
          options = "optional arguments"
      assert (
          stdout.getvalue()
          == f"""usage: nipype_cmd [-h] module interface
  
  Nipype interface runner
  
  positional arguments:
    module      Module name
    interface   Interface name
  
  {options}:
    -h, --help  show this help message and exit
  """
      )
  
file_path: nipype/nipype/utils/tests/test_cmd.py
imports: import pytest
  import sys
  from contextlib import contextmanager
  from io import StringIO
  from ...utils import nipype_cmd
label_desc: Use image node_id 2 for calling the TestNipypeCMD obj's underlying member method code with example usage: obj.test_main_returns_0_on_help() without return types