code: def log_softmax(
      x: paddle.Tensor,
      /,
      *,
      axis: Optional[int] = -1,
      complex_mode: Literal["split", "magnitude", "jax"] = "jax",
      out: Optional[paddle.Tensor] = None,
  ):
      x_max = paddle_backend.max(x, axis=axis, keepdims=True)
      sub_tmp = paddle_backend.subtract(x, x_max)
      ret = paddle_backend.sum(
          paddle_backend.exp(sub_tmp), axis=axis, keepdims=True
      )
      ret = paddle_backend.log(ret)
      ret = paddle_backend.subtract(sub_tmp, ret)
      return ret
  
file_path: ivy/ivy/functional/backends/paddle/activations.py
imports: from typing import Optional, Union, Literal
  import paddle
  import paddle.nn.functional
  import ivy.functional.backends.paddle
  import ivy
  from ivy.func_wrapper import with_unsupported_device_and_dtypes, with_supported_dtypes, with_supported_device_and_dtypes
  from .None import backend_version
label_desc: Use image node_id 8 for calling a global function with example usage: log_softmax() and returns: ret