code: def test_set_invalid_key(dvc):
      with pytest.raises(ConfigError, match=r"extra keys not allowed"):
          with dvc.config.edit() as conf:
              conf["core"]["invalid_key"] = "value"
  
imports: import os
  import textwrap
  import pytest
  from dvc.cli import main
  from dvc.config import Config, ConfigError
label_desc: Use image node_id 9 for calling a global function with example usage: test_set_invalid_key(dvc) without return types