code: def temporary_optimizer(opt):
      old_opt = _testinternalcapi.get_optimizer()
      _testinternalcapi.set_optimizer(opt)
      try:
          yield
      finally:
          _testinternalcapi.set_optimizer(old_opt)
  
imports: import contextlib
  import opcode
  import textwrap
  import unittest
  import _testinternalcapi
label_desc: Use image node_id 1 for calling a global function with example usage: temporary_optimizer(opt) without return types