def parse_args(arglist=None):
climan = CLIManager(conf, **SUB_CMDS)<EOL>create_complete_files(climan, CONFIG_DIR, '<STR_LIT>', '<STR_LIT>',<EOL>zsh_sourceable=True)<EOL>cmd_args, all_subs = climan.parse_args(arglist)<EOL>sub_cmd = cmd_args.loam_sub_name<EOL>if sub_cmd is None:<EOL><INDENT>return cmd_args.func<EOL><DEDENT>if sub_cmd != '<STR_LIT>':<EOL><INDENT>commands.report_parsing_problems(PARSING_OUT)<EOL><DEDENT>if conf.common.set:<EOL><INDENT>set_conf_str(conf, conf.common.set)<EOL><DEDENT>if conf.common.config:<EOL><INDENT>commands.config_pp(all_subs)<EOL><DEDENT>load_mplstyle()<EOL>try:<EOL><INDENT>_steps_to_slices()<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT>return cmd_args.func<EOL>
Parse cmd line arguments.

    Update :attr:`stagpy.conf` accordingly.

    Args:
        arglist (list of str): the list of cmd line arguments. If set to
            None, the arguments are taken from :attr:`sys.argv`.

    Returns:
        function: the function implementing the sub command to be executed.