code: def config(sub_parser):
      header = (
          "The subcommand `port` transpiles a trained "
          "estimator to a specific programming language."
      )
      footer = dedent(
          """
          Examples:
            `porter port model.pkl --language js --template attached`
            `porter port model.pkl --skip-warnings`
      """
      )
  
      parser = sub_parser.add_parser(
          "port",
          description=header,
          help="Port a trained estimator to a programming language.",
          epilog=footer,
          formatter_class=RawTextHelpFormatter,
          add_help=False,
      )
      for group in parser._action_groups:
          group.title = str(group.title).capitalize()
  
      parser.add_argument(
          "model", type=str, help="Path to an exported estimator."
      )
      parser.add_argument(
          "-l",
          "--language",
          type=str,
          required=False,
          choices=LANGUAGES.keys(),
          help="The name of the programming language.",
      )
      parser.add_argument(
          "-t",
          "--template",
          type=str,
          required=False,
          choices=["attached", "combined", "exported"],
          help="The name of the template.",
      )
  
      for fn in (arg_skip_warnings, arg_debug, arg_help):
          fn(parser)
  
      parser.set_defaults(func=main)
  
file_path: sklearn-porter/sklearn_porter/cli/command/port.py
imports: from argparse import RawTextHelpFormatter
  from logging import DEBUG
  from pathlib import Path
  from textwrap import dedent
  from typing import Dict
  from sklearn_porter import Estimator, options
  from sklearn_porter.cli.common import arg_debug, arg_help, arg_skip_warnings
  from sklearn_porter.cli.utils import load_model
  from sklearn_porter.language import LANGUAGES
label_desc: Use image node_id 1 for calling a global function with example usage: config(sub_parser) without return types