def update_parsed_node_config(
        self,
        parsed_node: FinalNode,
        config: ContextConfig,
        context=None,
        patch_config_dict=None,
        patch_file_id=None,
    ) -> None:
        """Given the ContextConfig used for parsing and the parsed node,
        generate and set the true values to use, overriding the temporary parse
        values set in _build_intermediate_parsed_node.
        """

        # build_config_dict takes the config_call_dict in the ContextConfig object
        # and calls calculate_node_config to combine dbt_project configs and
        # config calls from SQL files, plus patch configs (from schema files)
        # This normalize the config for a model node due #8520; should be improved latter
        if not patch_config_dict:
            patch_config_dict = {}
        if (
            parsed_node.resource_type == NodeType.Model
            and parsed_node.language == ModelLanguage.python
        ):
            if "materialized" not in patch_config_dict:
                patch_config_dict["materialized"] = "table"
        config_dict = config.build_config_dict(patch_config_dict=patch_config_dict)

        # Set tags on node provided in config blocks. Tags are additive, so even if
        # config has been built before, we don't have to reset tags in the parsed_node.
        model_tags = config_dict.get("tags", [])
        for tag in model_tags:
            if tag not in parsed_node.tags:
                parsed_node.tags.append(tag)

        # If we have meta in the config, copy to node level, for backwards
        # compatibility with earlier node-only config.
        if "meta" in config_dict and config_dict["meta"]:
            parsed_node.meta = config_dict["meta"]

        # If we have group in the config, copy to node level
        if "group" in config_dict and config_dict["group"]:
            parsed_node.group = config_dict["group"]

        # If we have access in the config, copy to node level
        if parsed_node.resource_type == NodeType.Model and config_dict.get("access", None):
            if AccessType.is_valid(config_dict["access"]):
                assert hasattr(parsed_node, "access")
                parsed_node.access = AccessType(config_dict["access"])
            else:
                raise InvalidAccessTypeError(
                    unique_id=parsed_node.unique_id, field_value=config_dict["access"]
                )

        # If we have docs in the config, merge with the node level, for backwards
        # compatibility with earlier node-only config.
        if "docs" in config_dict and config_dict["docs"]:
            # we set show at the value of the config if it is set, otherwise, inherit the value
            docs_show = (
                config_dict["docs"]["show"]
                if "show" in config_dict["docs"]
                else parsed_node.docs.show
            )
            if "node_color" in config_dict["docs"]:
                parsed_node.docs = Docs(
                    show=docs_show, node_color=config_dict["docs"]["node_color"]
                )
            else:
                parsed_node.docs = Docs(show=docs_show)

        # If we have contract in the config, copy to node level
        if "contract" in config_dict and config_dict["contract"]:
            contract_dct = config_dict["contract"]
            Contract.validate(contract_dct)
            # Seed node has contract config (from NodeConfig) but no contract in SeedNode
            if hasattr(parsed_node, "contract"):
                parsed_node.contract = Contract.from_dict(contract_dct)

        if get_flags().state_modified_compare_more_unrendered_values:
            # Use the patch_file.unrendered_configs if available to update patch_dict_config,
            # as provided patch_config_dict may actuallly already be rendered and thus sensitive to jinja evaluations
            if patch_file_id:
                patch_file = self.manifest.files.get(patch_file_id, None)
                if patch_file and isinstance(patch_file, SchemaSourceFile):
                    schema_key = resource_types_to_schema_file_keys[parsed_node.resource_type]
                    if unrendered_patch_config := patch_file.get_unrendered_config(
                        schema_key, parsed_node.name, getattr(parsed_node, "version", None)
                    ):
                        patch_config_dict = deep_merge(patch_config_dict, unrendered_patch_config)

        # unrendered_config is used to compare the original database/schema/alias
        # values and to handle 'same_config' and 'same_contents' calls
        parsed_node.unrendered_config = config.build_config_dict(
            rendered=False, patch_config_dict=patch_config_dict
        )

        parsed_node.config_call_dict = config._config_call_dict
        parsed_node.unrendered_config_call_dict = config._unrendered_config_call_dict

        # do this once before we parse the node database/schema/alias, so
        # parsed_node.config is what it would be if they did nothing
        self.update_parsed_node_config_dict(parsed_node, config_dict)
        # This updates the node database/schema/alias/relation_name
        self.update_parsed_node_relation_names(parsed_node, config_dict)

        # tests don't have hooks
        if parsed_node.resource_type == NodeType.Test:
            return

        # at this point, we've collected our hooks. Use the node context to
        # render each hook and collect refs/sources
        assert hasattr(parsed_node.config, "pre_hook") and hasattr(parsed_node.config, "post_hook")
        hooks = list(itertools.chain(parsed_node.config.pre_hook, parsed_node.config.post_hook))
        # skip context rebuilding if there aren't any hooks
        if not hooks:
            return
        if not context:
            context = self._context_for(parsed_node, config)
        for hook in hooks:
            get_rendered(hook.sql, context, parsed_node, capture_macros=True)
Given the ContextConfig used for parsing and the parsed node,
        generate and set the true values to use, overriding the temporary parse
        values set in _build_intermediate_parsed_node.
        
core/dbt/parser/base.py