code: def test_tensor_mismatched_type(self):
      # tf.function required because eager cond degenerates to Python if.
      @def_function.function
      def test_fn():
          conditional_expressions.if_exp(
              constant_op.constant(True),
              lambda: 1.0,
              lambda: 2,
              "expr_repr",
          )
  
      with self.assertRaisesRegex(
          TypeError,
          "'expr_repr' has dtype float32 in the main.*int32 in the else",
      ):
          test_fn()
  
file_path: tensorflow-upstream/tensorflow/python/autograph/operators/conditional_expressions_test.py
imports: from tensorflow.python.autograph.operators import conditional_expressions
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the IfExpTest obj's underlying member method code with example usage: obj.test_tensor_mismatched_type() without return types