code: def test_external_modification(path=None):
      from datalad.cmd import WitlessRunner as Runner
  
      runner = Runner(cwd=path)
      repo = GitRepo(path, create=True)
      config = repo.config
  
      key = "sec.sub.key"
      assert_not_in(key, config)
      config.set(key, "1", scope="local")
      assert_equal(config[key], "1")
  
      # we pick up the case where we modified so size changed
      runner.run(
          ["git", "config", "--local", "--replace-all", key, "10"]
      )
      # unfortunately we do not react for .get unless reload. But here
      # we will test if reload is correctly decides to reload without force
      config.reload()
      assert_equal(config[key], "10")
  
      # and no size change
      runner.run(
          ["git", "config", "--local", "--replace-all", key, "11"]
      )
      config.reload()
      assert_equal(config[key], "11")
  
imports: import logging
  import os
  from os.path import exists
  from os.path import join
  from unittest.mock import patch
  import pytest
  from datalad import cfg
  from datalad.api import create
  from datalad.cmd import CommandError
  from datalad.config import ConfigManager, _where_to_scope, parse_gitconfig_dump, rewrite_url, write_config_section
  from datalad.distribution.dataset import Dataset
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.gitrepo import GitRepo
  from datalad.tests.utils_pytest import DEFAULT_BRANCH, DEFAULT_REMOTE, assert_equal, assert_false, assert_in, assert_not_equal, assert_not_in, assert_raises, assert_true, chpwd, ok_file_has_content, with_tempfile, with_testsui, with_tree
  from datalad.utils import Path, get_home_envvars, swallow_logs
label_desc: Use image node_id 17 for calling a global function with example usage: test_external_modification(path) without return types