code: def testExecutionMode(self):
      self.assertTrue(config.get_synchronous_execution())
      self.assertEqual(context.SYNC, context.context().execution_mode)
  
      # If no op has been executed we should be able to set the execution mode as
      # well as any init-time configs.
      config.set_intra_op_parallelism_threads(1)
      config.set_synchronous_execution(False)
      config.set_intra_op_parallelism_threads(2)
  
      config.set_synchronous_execution(True)
      self.assertTrue(config.get_synchronous_execution())
      self.assertEqual(context.SYNC, context.context().execution_mode)
      config.set_synchronous_execution(False)
      self.assertFalse(config.get_synchronous_execution())
      self.assertEqual(context.ASYNC, context.context().execution_mode)
  
imports: from absl.testing import parameterized
  from tensorflow.core.protobuf import cluster_pb2
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.core.protobuf import tensorflow_server_pb2
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
  from tensorflow.python.util import compat
label_desc: Use image node_id 2 for calling the ConfigTest obj's underlying member method code with example usage: obj.testExecutionMode() without return types