docs: def parse_args(args=None):
          """
          :return: The result of applying argparse to sys.argv
          """
          #
          #   The main parser
          #
          parser = argparse.ArgumentParser(prog='tagcube',
                                           description=DESCRIPTION,
                                           epilog=EPILOG)
  
          #
          #   Parser for the common arguments
          #
          common_parser = argparse.ArgumentParser(add_help=False)
  
          common_parser.add_argument('--email',
                                     required=False,
                                     dest='email',
                                     type=argparse_email_type,
                                     help='The email address (user) to use when'
                                          ' sending requests to TagCube\'s REST'
                                          ' API')
  
          common_parser.add_argument('--key',
                                     required=False,
                                     dest='key',
                                     type=argparse_uuid_type,
                                     help='The API key to authenticate with'
                                          ' TagCube\'s REST API')
  
          common_parser.add_argument('-v',
                                     required=False,
                                     dest='verbose',
                                     action='store_true',
                                     help='Enables verbose output')
  
          #
          #   Parser for common scan arguments
          #
          scan_common = argparse.ArgumentParser(add_help=False)
  
          scan_common.add_argument('--scan-profile',
                                   required=False,
                                   dest='scan_profile',
                                   default='full_audit',
                                   help='The web application scan profile to use.'
                                        ' A complete list of scan profiles can be'
                                        ' retrieved from the API or Web UI.')
  
          scan_common.add_argument('--email-notify',
                                   required=False,
                                   dest='email_notify',
                                   type=argparse_email_type,
                                   help='Email address to notify when application'
                                        ' scan finishes')
  
          #
          #   Handle subcommands
          #
          subparsers = parser.add_subparsers(help='TagCube sub-commands',
                                             dest='subcommand')
  
          #
          #   Auth test subcommand
          #
          _help = ('Test configured authentication credentials and exit. No'
                   ' target URL nor email notifications need to be configured'
                   ' to verify the credentials.')
          auth_parser = subparsers.add_parser('auth',
                                              help=_help,
                                              parents=[common_parser])
  
          #
          #   Scan
          #
          scan_parser = subparsers.add_parser('scan',
                                              help='Web application security'
                                                   ' scan using TagCube',
                                              parents=[common_parser,
                                                       scan_common])
  
          scan_parser.add_argument('--root-url',
                                   required=True,
                                   dest='root_url',
                                   type=argparse_url_type,
                                   help='Root URL for web application security'
                                        ' scan (e.g. https://www.target.com/)')
  
          scan_parser.add_argument('--path-file',
                                   required=False,
                                   dest='path_file',
                                   default=['/'],
                                   type=argparse_path_list_type,
                                   help='A file specifying the URL paths (without'
                                        ' the domain name) which TagCube will use'
                                        ' to bootstrap the web crawler. The "/"'
                                        ' path is used when no'
                                        ' --path-file parameter is specified.')
  
          #
          #   Batch scan subcommand
          #
          _help = ('Scan multiple domains and URLs in one command, one scan will'
                   ' be started for each unique protocol-domain-port tuple, the'
                   ' URLs paths are processed and sent in the scan configuration')
          batch_parser = subparsers.add_parser('batch',
                                               help=_help,
                                               parents=[common_parser,
                                                        scan_common])
  
          batch_parser.add_argument('--urls-file',
                                    required=True,
                                    dest='urls_file',
                                    type=argparse.FileType('r'),
                                    help='Text file containing one URL per line')
  
          #
          #   Version subcommand
          #
          _help = 'Print the tagcube-cli version'
          version_parser = subparsers.add_parser('version', help=_help)
  
          cmd_args = parser.parse_args(args)
  
          handlers = {'scan': TagCubeCLI.handle_scan_args,
                      'auth': TagCubeCLI.handle_auth_args,
                      'batch': TagCubeCLI.handle_batch_args,
                      'version': TagCubeCLI.handle_version_args,}
  
          handler = handlers.get(cmd_args.subcommand)
          return handler(parser, cmd_args)