def main(args):
try:<EOL><INDENT>import __main__<EOL>parser = argparse.ArgumentParser(<EOL>usage='<STR_LIT>'<EOL>+ str(__version__),<EOL>formatter_class=argparse.RawTextHelpFormatter)<EOL>parser.add_argument('<STR_LIT>', action='<STR_LIT:version>',<EOL>version='<STR_LIT>' + str(__version__))<EOL>build_subcommands_parser(parser, __main__)<EOL>if len(args) <= <NUM_LIT:1>:<EOL><INDENT>parser.print_help()<EOL>return <NUM_LIT:1><EOL><DEDENT>options = parser.parse_args(args[<NUM_LIT:1>:])<EOL>func_args = filter_subcommand_args(options.func, options)<EOL>options.func(**func_args)<EOL><DEDENT>except RuntimeError as err:<EOL><INDENT>LOGGER.error(err)<EOL>return err.code<EOL><DEDENT>
Main Entry Point