code: def generate_subparser(
      parser, name, description=None, subcommand=False, **kwargs
  ):
      """Helper function to return a subparser with the given options"""
      subparser = parser.add_parser(
          name,
          description=description,
          formatter_class=RawDescriptionHelpFormatter,
          **kwargs,
      )
  
      if subcommand:
          subparser.set_defaults(subcommand=name)
      else:
          subparser.set_defaults(command=name)
  
      return subparser
  
imports: from abc import abstractmethod
  from argparse import _AppendAction, Action, ArgumentTypeError, RawDescriptionHelpFormatter
  import os
  import textwrap
  from streamalert.apps.config import AWS_RATE_RE, AWS_RATE_HELPER
label_desc: Use image node_id 7 for calling a global function with example usage: generate_subparser(parser, name, description, subcommand) and returns: subparser