def t_power(logu, t, self_normalized=False, name=None):
with tf.compat.v1.name_scope(name, "<STR_LIT>", [logu, t]):<EOL><INDENT>logu = tf.convert_to_tensor(value=logu, name="<STR_LIT>")<EOL>t = tf.convert_to_tensor(value=t, dtype=logu.dtype.base_dtype, name="<STR_LIT:t>")<EOL>fu = tf.math.expm1(t * logu)<EOL>if self_normalized:<EOL><INDENT>fu -= t * tf.math.expm1(logu)<EOL><DEDENT>fu *= tf.where(tf.logical_and(<NUM_LIT:0.> < t, t < <NUM_LIT:1.>),<EOL>-tf.ones_like(t),<EOL>tf.ones_like(t))<EOL>return fu<EOL><DEDENT>
The T-Power Csiszar-function in log-space.

    A Csiszar-function is a member of,

    ```none
    F = { f:R_+ to R : f convex }.
    ```

    When `self_normalized = True` the T-Power Csiszar-function is:

    ```none
    f(u) = s [ u**t - 1 - t(u - 1) ]
    s = { -1   0 < t < 1
        { +1   otherwise
    ```

    When `self_normalized = False` the `- t(u - 1)` term is omitted.

    This is similar to the `amari_alpha` Csiszar-function, with the associated
    divergence being the same up to factors depending only on `t`.

    Args:
      logu: `float`-like `Tensor` representing `log(u)` from above.
      t:  `Tensor` of same `dtype` as `logu` and broadcastable shape.
      self_normalized: Python `bool` indicating whether `f'(u=1)=0`.
      name: Python `str` name prefixed to Ops created by this function.

    Returns:
      t_power_of_u: `float`-like `Tensor` of the Csiszar-function evaluated
        at `u = exp(logu)`.