Util to save some name sequence to a dict. For instance, `("location","query")` would save
    to dest["location"]["query"].

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