code: def test_overrides_dict_str(logger):
      config = Config({}, {"spam": "lobster"})
  
      config.add("spam", {"ham": "eggs"}, "env", {dict, str})
  
      assert config.spam == {"ham": "eggs"}
  
      # assert len(caplog.records) == 1
      # msg = caplog.messages[0]
      assert logger.method_calls
      msg = str(logger.method_calls[0].args[1])
      assert msg == (
          "cannot override dictionary config setting 'spam', "
          "ignoring (use 'spam.key=value' to set individual elements)"
      )
  
imports: import pickle
  import time
  from pathlib import Path
  from unittest import mock
  import pytest
  import sphinx
  from sphinx.builders.gettext import _gettext_compact_validator
  from sphinx.config import ENUM, Config, _Opt, check_confval_types
  from sphinx.deprecation import RemovedInSphinx90Warning
  from sphinx.errors import ConfigError, ExtensionError, VersionRequirementError
label_desc: Use image node_id 8 for calling a global function with example usage: test_overrides_dict_str(logger) without return types