code: def tent_transform(value: types.FloatTensor) -> types.FloatTensor:
      r"""Returns the tent transform of a given `Tensor`.
  
      #### Examples
  
      ```python
      import tensorflow as tf
      import tf_quant_finance as tff
  
      # Example: Commputing the tent transform of a given vector.
  
      tff.math.qmc.utils.tent_transform(tf.constant([0, .2, .4, .6, .8, 1]))
      # ==> tf.Tensor([0, .4, .8, .8, .4, 0.], shape=(4,), dtype=float32)
      ```
  
      Args:
        value: Scalar `Tensor` of real values in the `[0, 1)` range.
  
      Returns:
        `Tensor` with the same `shape` as `value` equal to `2 ** value` if `value`
        is less than `0.5` or `2 * (1 - value)` otherwise.
      """
  
      return tf.where(value < 0.5, 2 * value, 2 * (1 - 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 4 for calling a global function with example usage: tent_transform(value) and returns: tf