code: def parse_kernels(subparsers):
      if six.PY2:
          parser_kernels = subparsers.add_parser(
              "kernels",
              formatter_class=argparse.RawTextHelpFormatter,
              help=Help.group_kernels,
          )
      else:
          parser_kernels = subparsers.add_parser(
              "kernels",
              formatter_class=argparse.RawTextHelpFormatter,
              help=Help.group_kernels,
              aliases=["k"],
          )
      subparsers_kernels = parser_kernels.add_subparsers(
          title="commands", dest="command"
      )
      subparsers_kernels.required = True
      subparsers_kernels.choices = Help.kernels_choices
  
      # Kernels list/search
      parser_kernels_list = subparsers_kernels.add_parser(
          "list",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_kernels_list,
      )
      parser_kernels_list_optional = (
          parser_kernels_list._action_groups.pop()
      )
      parser_kernels_list_optional.add_argument(
          "-m",
          "--mine",
          dest="mine",
          action="store_true",
          help=Help.param_mine,
      )
      parser_kernels_list_optional.add_argument(
          "-p", "--page", dest="page", default=1, help=Help.param_page
      )
      parser_kernels_list_optional.add_argument(
          "--page-size",
          dest="page_size",
          default=20,
          help=Help.param_page_size,
      )
      parser_kernels_list_optional.add_argument(
          "-s", "--search", dest="search", help=Help.param_search
      )
      parser_kernels_list_optional.add_argument(
          "-v",
          "--csv",
          dest="csv_display",
          action="store_true",
          help=Help.param_csv,
      )
      parser_kernels_list_optional.add_argument(
          "--parent",
          dest="parent",
          required=False,
          help=Help.param_kernel_parent,
      )
      parser_kernels_list_optional.add_argument(
          "--competition",
          dest="competition",
          required=False,
          help=Help.param_kernel_competition,
      )
      parser_kernels_list_optional.add_argument(
          "--dataset",
          dest="dataset",
          required=False,
          help=Help.param_kernel_dataset,
      )
      parser_kernels_list_optional.add_argument(
          "--user",
          dest="user",
          required=False,
          help=Help.param_kernel_user,
      )
      parser_kernels_list_optional.add_argument(
          "--language",
          dest="language",
          required=False,
          help=Help.param_kernel_language,
      )
      parser_kernels_list_optional.add_argument(
          "--kernel-type",
          dest="kernel_type",
          required=False,
          help=Help.param_kernel_type,
      )
      parser_kernels_list_optional.add_argument(
          "--output-type",
          dest="output_type",
          required=False,
          help=Help.param_kernel_output_type,
      )
      parser_kernels_list_optional.add_argument(
          "--sort-by",
          dest="sort_by",
          required=False,
          help=Help.param_kernel_sort_by,
      )
      parser_kernels_list._action_groups.append(
          parser_kernels_list_optional
      )
      parser_kernels_list.set_defaults(func=api.kernels_list_cli)
  
      # Kernels init
      parser_kernels_init = subparsers_kernels.add_parser(
          "init",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_kernels_init,
      )
      parser_kernels_init_optional = (
          parser_kernels_init._action_groups.pop()
      )
      parser_kernels_init_optional.add_argument(
          "-p",
          "--path",
          dest="folder",
          required=False,
          help=Help.param_kernel_upfile,
      )
      parser_kernels_init._action_groups.append(
          parser_kernels_init_optional
      )
      parser_kernels_init.set_defaults(func=api.kernels_initialize_cli)
  
      # Kernels push
      parser_kernels_push = subparsers_kernels.add_parser(
          "push",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_kernels_push,
      )
      parser_kernels_push_optional = (
          parser_kernels_push._action_groups.pop()
      )
      parser_kernels_push_optional.add_argument(
          "-p",
          "--path",
          dest="folder",
          required=False,
          help=Help.param_kernel_upfile,
      )
      parser_kernels_push._action_groups.append(
          parser_kernels_push_optional
      )
      parser_kernels_push.set_defaults(func=api.kernels_push_cli)
  
      # Kernels pull
      parser_kernels_pull = subparsers_kernels.add_parser(
          "pull",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_kernels_pull,
      )
      parser_kernels_pull_optional = (
          parser_kernels_pull._action_groups.pop()
      )
      parser_kernels_pull_optional.add_argument(
          "kernel", nargs="?", default=None, help=Help.param_kernel
      )
      parser_kernels_pull_optional.add_argument(
          "-k",
          "--kernel",
          dest="kernel",
          required=False,
          help=argparse.SUPPRESS,
      )
      parser_kernels_pull_optional.add_argument(
          "-p",
          "--path",
          dest="path",
          required=False,
          help=Help.param_downfolder,
      )
      parser_kernels_pull_optional.add_argument(
          "-w",
          "--wp",
          dest="path",
          action="store_const",
          const=".",
          required=False,
          help=Help.param_wp,
      )
      parser_kernels_pull_optional.add_argument(
          "-m",
          "--metadata",
          dest="metadata",
          action="store_true",
          help=Help.param_kernel_pull_metadata,
      )
      parser_kernels_pull._action_groups.append(
          parser_kernels_pull_optional
      )
      parser_kernels_pull.set_defaults(func=api.kernels_pull_cli)
  
      # Kernels output
      parser_kernels_output = subparsers_kernels.add_parser(
          "output",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_kernels_output,
      )
      parser_kernels_output_optional = (
          parser_kernels_output._action_groups.pop()
      )
      parser_kernels_output_optional.add_argument(
          "kernel", nargs="?", default=None, help=Help.param_kernel
      )
      parser_kernels_output_optional.add_argument(
          "-k",
          "--kernel",
          dest="kernel_opt",
          required=False,
          help=argparse.SUPPRESS,
      )
      parser_kernels_output_optional.add_argument(
          "-p",
          "--path",
          dest="path",
          required=False,
          help=Help.param_downfolder,
      )
      parser_kernels_output_optional.add_argument(
          "-w",
          "--wp",
          dest="path",
          action="store_const",
          const=".",
          required=False,
          help=Help.param_wp,
      )
      parser_kernels_output_optional.add_argument(
          "-o",
          "--force",
          dest="force",
          action="store_true",
          required=False,
          help=Help.param_force,
      )
      parser_kernels_output_optional.add_argument(
          "-q",
          "--quiet",
          dest="quiet",
          action="store_true",
          required=False,
          help=Help.param_quiet,
      )
      parser_kernels_output._action_groups.append(
          parser_kernels_output_optional
      )
      parser_kernels_output.set_defaults(func=api.kernels_output_cli)
  
      # Kernels status
      parser_kernels_status = subparsers_kernels.add_parser(
          "status",
          formatter_class=argparse.RawTextHelpFormatter,
          help=Help.command_kernels_status,
      )
      parser_kernels_status_optional = (
          parser_kernels_status._action_groups.pop()
      )
      parser_kernels_status_optional.add_argument(
          "kernel", nargs="?", default=None, help=Help.param_kernel
      )
      parser_kernels_status_optional.add_argument(
          "-k",
          "--kernel",
          dest="kernel_opt",
          required=False,
          help=argparse.SUPPRESS,
      )
      parser_kernels_status._action_groups.append(
          parser_kernels_status_optional
      )
      parser_kernels_status.set_defaults(func=api.kernels_status_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 5 for calling a global function with example usage: parse_kernels(subparsers) without return types