def apply_config_defaults(parser, args, root):
if root is None:<EOL><INDENT>try:<EOL><INDENT>from pep8radius.vcs import VersionControl<EOL>root = VersionControl.which().root_dir()<EOL><DEDENT>except NotImplementedError:<EOL><INDENT>pass  <EOL><DEDENT><DEDENT>config = SafeConfigParser()<EOL>config.read(args.global_config)<EOL>if root and not args.ignore_local_config:<EOL><INDENT>config.read(local_config_files(root))<EOL><DEDENT>try:<EOL><INDENT>defaults = dict((k.lstrip('<STR_LIT:->').replace('<STR_LIT:->', '<STR_LIT:_>'), v)<EOL>for k, v in config.items("<STR_LIT>"))<EOL>parser.set_defaults(**defaults)<EOL><DEDENT>except NoSectionError:<EOL><INDENT>pass  <EOL><DEDENT>return parser<EOL>
Update the parser's defaults from either the arguments' config_arg or
    the config files given in config_files(root).