code: def options(optimizer_options):
      old_opts = context.context().get_optimizer_experimental_options()
      context.context().set_optimizer_experimental_options(
          optimizer_options
      )
      try:
          yield
      finally:
          context.context().set_optimizer_experimental_options(old_opts)
  
file_path: tensorflow/tensorflow/python/eager/small_constants_optimizer_test.py
imports: import contextlib
  import timeit
  from tensorflow.python.eager import context
  from tensorflow.python.eager.polymorphic_function import polymorphic_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling a global function with example usage: options(optimizer_options) without return types