code: def test_small_constants_optimization_disabled(self):
      @polymorphic_function.function(
          experimental_attributes={
              "runtime_constant_optimization": True
          }
      )
      def func(inp):
          return inp
  
      x = constant_op.constant(True)
      with self.assertRaisesRegex(
          errors.InvalidArgumentError,
          (
              "Expecting boolean tensor to be on host when"
              " small_constants_optimizer is enabled."
          ),
      ):
          func(x)
  
file_path: tensorflow-upstream/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 3 for calling the FunctionTest obj's underlying member method code with example usage: obj.test_small_constants_optimization_disabled() and returns: inp