code: def test_invalid_configvar_access():
      root = configdefaults.config
      root_test = _create_test_config()
  
      # add a setting to the test instance
      root_test.add(
          "test__on_test_instance",
          "This config setting was added to the test instance.",
          configparser.IntParam(5),
      )
      assert hasattr(root_test, "test__on_test_instance")
      # While the property _actually_ exists on all instances,
      # accessing it through another instance raises an AttributeError.
      assert not hasattr(root, "test__on_test_instance")
  
      # But we can make sure that nothing crazy happens when we access it:
      with pytest.raises(
          configparser.ConfigAccessViolation, match="different instance"
      ):
          print(root.test__on_test_instance)
  
      # And also that we can't add two configs of the same name to different instances:
      with pytest.raises(AttributeError, match="already registered"):
          root.add(
              "test__on_test_instance",
              "This config setting was already added to another instance.",
              configparser.IntParam(5),
          )
  
imports: import configparser
  import io
  import pickle
  import pytest
  from pytensor import configdefaults, configparser
  from pytensor.configdefaults import short_platform
  from pytensor.configparser import ConfigParam
label_desc: Use image node_id 7 for calling a global function with example usage: test_invalid_configvar_access() without return types