code: def testConstantValue(self):
      f1 = lambda: constant_op.constant(5)
      f2 = lambda: constant_op.constant(32)
  
      # Boolean pred
      self.assertEqual(
          5, utils.constant_value(utils.smart_cond(True, f1, f2))
      )
      self.assertEqual(
          32, utils.constant_value(utils.smart_cond(False, f1, f2))
      )
  
      # Integer pred
      self.assertEqual(
          5, utils.constant_value(utils.smart_cond(1, f1, f2))
      )
      self.assertEqual(
          32, utils.constant_value(utils.smart_cond(0, f1, f2))
      )
  
      # Unknown pred
      pred = array_ops.placeholder_with_default(True, shape=())
      self.assertIsNone(
          utils.constant_value(utils.smart_cond(pred, f1, f2))
      )
  
      # Error case
      with self.assertRaises(TypeError):
          utils.constant_value(5)
  
file_path: tensorflow/tensorflow/python/layers/utils_test.py
imports: from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import test_util
  from tensorflow.python.layers import utils
  from tensorflow.python.ops import array_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the ConstantValueTest obj's underlying member method code with example usage: obj.testConstantValue() without return types