code: def parse_models(subparsers):
      parser_models = subparsers.add_parser(
          "models",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.group_models,
          aliases=["m"],
      )
  
      subparsers_models = parser_models.add_subparsers(
          title="commands", dest="command"
      )
      subparsers_models.required = True
      subparsers_models.choices = Help.models_choices
  
      # Models Instances.
      parse_model_instances(subparsers_models)
  
      # Models get
      parser_models_get = subparsers_models.add_parser(
          "get",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_models_get,
      )
      parser_models_get_optional = (
          parser_models_get._action_groups.pop()
      )
      parser_models_get_optional.add_argument(
          "model", help=Help.param_model
      )
      parser_models_get_optional.add_argument(
          "-p",
          "--path",
          dest="folder",
          required=False,
          help=Help.param_model_downfile,
      )
      parser_models_get._action_groups.append(
          parser_models_get_optional
      )
      parser_models_get.set_defaults(func=api.model_get_cli)
  
      # Models list
      parser_models_list = subparsers_models.add_parser(
          "list",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_models_list,
      )
      parser_models_list_optional = (
          parser_models_list._action_groups.pop()
      )
      parser_models_list.add_argument(
          "--sort-by",
          dest="sort_by",
          required=False,
          help=Help.param_model_sort_by,
      )
      parser_models_list.add_argument(
          "-s",
          "--search",
          dest="search",
          required=False,
          help=Help.param_search,
      )
      parser_models_list.add_argument(
          "--owner",
          dest="owner",
          required=False,
          help=Help.param_model_owner,
      )
      parser_models_list.add_argument(
          "--page-size",
          dest="page_size",
          default=20,
          help=Help.param_page_size,
      )
      parser_models_list.add_argument(
          "--page-token",
          dest="page_token",
          required=False,
          help=Help.param_page_token,
      )
      parser_models_list.add_argument(
          "-v",
          "--csv",
          dest="csv_display",
          action="store_true",
          help=Help.param_csv,
      )
      parser_models_list._action_groups.append(
          parser_models_list_optional
      )
      parser_models_list.set_defaults(func=api.model_list_cli)
  
      # Models init
      parser_models_init = subparsers_models.add_parser(
          "init",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_models_init,
      )
      parser_models_init_optional = (
          parser_models_init._action_groups.pop()
      )
      parser_models_init_optional.add_argument(
          "-p",
          "--path",
          dest="folder",
          required=False,
          help=Help.param_model_upfile,
      )
      parser_models_init._action_groups.append(
          parser_models_init_optional
      )
      parser_models_init.set_defaults(func=api.model_initialize_cli)
  
      # Models create
      parser_models_create = subparsers_models.add_parser(
          "create",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_models_new,
      )
      parser_models_create_optional = (
          parser_models_create._action_groups.pop()
      )
      parser_models_create_optional.add_argument(
          "-p",
          "--path",
          dest="folder",
          required=False,
          help=Help.param_model_upfile,
      )
      parser_models_create._action_groups.append(
          parser_models_create_optional
      )
      parser_models_create.set_defaults(func=api.model_create_new_cli)
  
      # Models delete
      parser_models_delete = subparsers_models.add_parser(
          "delete",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_models_delete,
      )
      parser_models_delete_optional = (
          parser_models_delete._action_groups.pop()
      )
      parser_models_delete_optional.add_argument(
          "model", help=Help.param_model
      )
      parser_models_delete_optional.add_argument(
          "-y",
          "--yes",
          dest="yes",
          action="store_true",
          help=Help.param_yes,
      )
      parser_models_delete._action_groups.append(
          parser_models_delete_optional
      )
      parser_models_delete.set_defaults(func=api.model_delete_cli)
  
      # Models update
      parser_models_update = subparsers_models.add_parser(
          "update",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_models_update,
      )
      parser_models_update_optional = (
          parser_models_update._action_groups.pop()
      )
      parser_models_update_optional.add_argument(
          "-p",
          "--path",
          dest="folder",
          required=False,
          help=Help.param_model_upfile,
      )
      parser_models_update._action_groups.append(
          parser_models_update_optional
      )
      parser_models_update.set_defaults(func=api.model_update_cli)
  
file_path: kaggle-api/kaggle/cli.py
imports: from __future__ import print_function
  import argparse
  import json
  from kaggle import api
  from kaggle import KaggleApi
  from .rest import ApiException
  import six
label_desc: Use image node_id 6 for calling a global function with example usage: parse_models(subparsers) without return types