def save_to_name_list(dest, name_parts, value):
if len(name_parts) > <NUM_LIT:1>:<EOL><INDENT>for part in name_parts[:-<NUM_LIT:1>]:<EOL><INDENT>if part not in dest:<EOL><INDENT>dest[part] = {}<EOL><DEDENT>dest = dest[part]<EOL><DEDENT><DEDENT>dest[name_parts[-<NUM_LIT:1>]] = value<EOL>
Util to save some name sequence to a dict. For instance, `("location","query")` would save
to dest["location"]["query"].