code: def test_config_with_nested_dict_override(
      default_model_storage: ModelStorage,
  ):
      class ComponentWithNestedDictConfig(GraphComponent):
          @staticmethod
          def get_default_config() -> Dict[Text, Any]:
              return {
                  "nested-dict": {"key1": "value1", "key2": "value2"}
              }
  
          @classmethod
          def create(
              cls,
              config: Dict,
              model_storage: ModelStorage,
              resource: Resource,
              execution_context: ExecutionContext,
              **kwargs: Any,
          ) -> ComponentWithNestedDictConfig:
              return cls()
  
          def run(self) -> None:
              return None
  
      node = GraphNode(
          node_name="nested_dict_config",
          component_class=ComponentWithNestedDictConfig,
          constructor_name="create",
          component_config={"nested-dict": {"key2": "override-value2"}},
          fn_name="run",
          inputs={},
          eager=True,
          model_storage=default_model_storage,
          resource=None,
          execution_context=ExecutionContext(GraphSchema({}), "123"),
      )
  
      expected_config = {
          "nested-dict": {"key1": "value1", "key2": "override-value2"}
      }
  
      for key, value in expected_config.items():
          assert key in node._component_config
          if isinstance(value, dict):
              for nested_key, nested_value in expected_config[
                  key
              ].items():
                  assert nested_key in node._component_config[key]
                  assert (
                      node._component_config[key][nested_key]
                      == nested_value
                  )
  
imports: from __future__ import annotations
  from typing import Any, Dict, Optional, Text
  from unittest.mock import Mock
  import pytest
  import rasa.shared
  import rasa.shared.utils
  import rasa.shared.utils.io
  from rasa.engine.exceptions import GraphComponentException
  from rasa.engine.graph import ExecutionContext, GraphComponent, GraphNode, GraphSchema
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.storage.resource import Resource
  from tests.engine.graph_components_test_classes import AddInputs, ExecutionContextAware, ProvideX, SubtractByX, PersistableTestComponent
label_desc: Use image node_id 12 for calling a global function with example usage: test_config_with_nested_dict_override(default_model_storage) and returns: dict, cls, None