code: def test_plugin_registry_global_settings():
      plugins = GeneralCallableRegistry()
  
      # we need some default plugin, but we won't do anything with it
      plugins.register("default", lambda x: x)
      plugins.enable("default")
  
      # default value of the global flag
      assert plugins.global_setting is None
  
      # enabling changes the global state, not the options
      plugins.enable(global_setting=True)
      assert plugins.global_setting is True
      assert plugins._options == {}
  
      # context manager changes global state temporarily
      with plugins.enable(global_setting="temp"):
          assert plugins.global_setting == "temp"
          assert plugins._options == {}
      assert plugins.global_setting is True
      assert plugins._options == {}
  
file_path: altair/tests/utils/test_plugin_registry.py
imports: from altair.utils.plugin_registry import PluginRegistry
  from typing import Callable
label_desc: Use image node_id 3 for calling a global function with example usage: test_plugin_registry_global_settings() without return types