code: def exp2(value: types.IntTensor) -> types.IntTensor:
      r"""Returns the point-wise base-2 exponentiation of a given `Tensor`.
  
      Args:
        value: Positive scalar `Tensor` of integers.
  
      #### Examples
  
      ```python
      import tensorflow as tf
      import tf_quant_finance as tff
  
      # Example: Computing the base-2 exponentiation of a range.
  
      tff.math.qmc.utils.exp2(tf.range(0, 5))
      # ==> tf.Tensor([1, 2, 4, 8, 16], shape=(5,), dtype=int32)
      ```
  
      Returns:
        `Tensor` with the same `shape` and `dtype` as `value` equal to `1 << value`.
      """
      shape = get_shape(value)
      dtype = value.dtype
  
      max_allowed_value = tf.constant(
          8 * dtype.size, shape=shape, dtype=dtype
      )
      if not dtype.is_unsigned:
          max_allowed_value -= 1
  
      return tf.where(
          tf.greater_equal(value, max_allowed_value),
          tf.constant(dtype.max, shape=shape, dtype=dtype),
          tf.bitwise.left_shift(
              tf.constant(1, shape=shape, dtype=dtype), value
          ),
      )
  
file_path: tf-quant-finance/tf_quant_finance/math/qmc/utils.py
imports: from typing import Union
  import tensorflow.compat.v2
  from tf_quant_finance import types
label_desc: Use image node_id 1 for calling a global function with example usage: exp2(value) and returns: tf