code: def log_softmax(
      x: Tensor,
      /,
      *,
      axis: Optional[int] = -1,
      complex_mode: Literal["split", "magnitude", "jax"] = "jax",
      out: Optional[Tensor] = None,
  ):
      if "complex" in str(x.dtype):
          x_max = tf_backend.max(x, axis=axis, keepdims=True)
          sub_temp = tf.subtract(x, x_max)
          ret = tf.reduce_sum(
              tf.exp(sub_temp), axis=axis, keepdims=True
          )
          ret = tf.math.log(ret)
          return tf.subtract(sub_temp, ret)
      return tf.nn.log_softmax(x, axis)
  
file_path: ivy/ivy/functional/backends/tensorflow/activations.py
imports: from typing import Optional, Union, Literal
  import tensorflow
  from tensorflow.python.types.core import Tensor
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from .None import backend_version
  import ivy.functional.backends.tensorflow
label_desc: Use image node_id 8 for calling a global function with example usage: log_softmax() and returns: tf, tf