def _set_opt(config_dict, path, value):
if value is None:<EOL><INDENT>return<EOL><DEDENT>if '<STR_LIT:.>' not in path:<EOL><INDENT>config_dict[path] = value<EOL>return<EOL><DEDENT>key, rest = path.split("<STR_LIT:.>", <NUM_LIT:1>)<EOL>if key not in config_dict:<EOL><INDENT>config_dict[key] = {}<EOL><DEDENT>_set_opt(config_dict[key], rest, value)<EOL>
Set the value in the dictionary at the given path if the value is not None.