code: def softmax(
      x: Tensor,
      /,
      *,
      axis: Optional[int] = None,
      out: Optional[Tensor] = None,
  ) -> Tensor:
      if axis is None:
          axis = -1
      dtype = x.dtype
      if "complex" in str(dtype):
          amax = tf_backend.max(x, axis=axis, keepdims=True)
          normalized = tf.exp(tf.subtract(x, amax))
          return tf.divide(
              normalized,
              tf.reduce_sum(normalized, axis=axis, keepdims=True),
          )
      return tf.nn.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 5 for calling a global function with example usage: softmax() and returns: tf, tf