code: def parse_args(args):
      header = "sklearn-porter CLI v{}".format(porter_version)
      footer = dedent(
          """
          Examples:
            `porter show`
            `porter port model --language js --template attached`
            `porter save model --directory /tmp --skip-warnings`
          
          Manuals:
            https://github.com/nok/sklearn-porter
            https://github.com/scikit-learn/scikit-learn
      """
      )
      parser = ArgumentParser(
          description=header,
          formatter_class=RawTextHelpFormatter,
          add_help=False,
          epilog=footer,
      )
      for group in parser._action_groups:
          group.title = str(group.title).capitalize()
  
      sp = parser.add_subparsers(
          metavar="command",
          dest="cmd",
      )
      sp.required = True
  
      show.config(sp)
      port.config(sp)
      save.config(sp)
  
      arg_version(parser)
      arg_help(parser)
  
      if len(sys.argv) == 1 and "SKLEARN_PORTER_PYTEST" not in environ:
          parser.print_help(sys.stdout)
          sys.exit(1)
  
      return parser.parse_args(args)
  
file_path: sklearn-porter/sklearn_porter/cli/__main__.py
imports: import sys
  from os import environ
  from argparse import ArgumentParser, RawTextHelpFormatter
  from textwrap import dedent
  from sklearn_porter import __version__
  from sklearn_porter.cli.command import port, save, show
  from sklearn_porter.cli.common import arg_help, arg_version
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args(args) and returns: parser