code: def test_exp2_without_overflow(self):
      test_cases = [
          tf.uint8,
          tf.int8,
          tf.uint16,
          tf.int16,
          tf.uint32,
          tf.int32,
          tf.uint64,
          tf.int64,
      ]
  
      for dtype in test_cases:
          expected = tf.constant([2, 4, 8, 16, 32, 64], dtype=dtype)
          actual = utils.exp2(
              tf.constant([1, 2, 3, 4, 5, 6], 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 1 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_exp2_without_overflow() without return types