code: def option_context(config=None):
      global_options = get_global_option()
  
      try:
          config = config or dict()
          local_options = Config(deepcopy(global_options._config))
          local_options.update(config)
          _options_local.default_options = local_options
          yield local_options
      finally:
          _options_local.default_options = global_options
  
imports: import contextlib
  import functools
  import operator
  import os
  import warnings
  import threading
  from copy import deepcopy
  from typing import Union, Dict
label_desc: Use image node_id 1 for calling a global function with example usage: option_context(config) without return types