code: def test_exp2_with_overflow(self):
      test_cases = [
          (tf.uint8, 9),
          (tf.int8, 8),
          (tf.uint16, 17),
          (tf.int16, 16),
          (tf.uint32, 33),
          (tf.int32, 32),
          (tf.uint64, 65),
          (tf.int64, 64),
      ]
  
      for dtype, value in test_cases:
          expected = tf.constant([dtype.max, dtype.max], dtype=dtype)
          actual = utils.exp2(
              tf.constant([value, value + 1], dtype=dtype)
          )
  
          with self.subTest("Values"):
              self.assertAllEqual(
                  self.evaluate(actual), self.evaluate(expected)
              )
          with self.subTest("DType"):
              self.assertEqual(actual.dtype, expected.dtype)
  
file_path: tf-quant-finance/tf_quant_finance/math/qmc/utils_test.py
imports: import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 2 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_exp2_with_overflow() without return types