code: def testCondConstPropagation_errorMsg(self):
      self.skipTest("b/132430685")
      with self.session() as sess, self.test_scope():
          xla_context = control_flow_ops.XLAControlFlowContext()
          xla_context.Enter()
  
          x = array_ops.placeholder(dtypes.float32)
          p = random_ops.random_uniform(
              [], minval=1, maxval=3, dtype=dtypes.int32
          )
  
          # TODO(b/129021699): Wrapping this in a tf.function does not work.
          def if_true():
              # This emits a StridedSlice op which expects the index to be a
              # compile-time const.
              return x[:p]
  
          def if_false():
              return array_ops.fill([p], 5.0)
  
          output = cond.cond(
              constant_op.constant(True), if_true, if_false
          )
  
          with self.assertRaisesRegex(
              errors.InvalidArgumentError,
              "must be a compile-time constant",
          ):
              sess.run(
                  output,
                  feed_dict={
                      x: [0.0, 1.0, 2.0],
                  },
              )
  
          xla_context.Exit()
  
imports: from tensorflow.compiler.tests import xla_test
  from tensorflow.python.client import session
  from tensorflow.python.compiler.xla import xla
  from tensorflow.python.eager import def_function
  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_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import control_flow_switch_case
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 6 for calling the CondTest obj's underlying member method code with example usage: obj.testCondConstPropagation_errorMsg() and returns: x, array_ops