code: def softmax(logits: ragged_tensor.Ragged, axis=None, name=None):
      """Computes softmax activations.
  
      Used for multi-class predictions. The sum of all outputs generated by softmax
      is 1.
  
      This function performs the equivalent of
  
          softmax = tf.exp(logits) / tf.reduce_sum(tf.exp(logits), axis)
  
      Example usage:
  
      >>> softmax = tf.nn.softmax([-1, 0., 1.])
      >>> softmax
      <tf.Tensor: shape=(3,), dtype=float32,
      numpy=array([0.09003057, 0.24472848, 0.66524094], dtype=float32)>
      >>> sum(softmax)
      <tf.Tensor: shape=(), dtype=float32, numpy=1.0>
  
      Args:
        logits: A non-empty `Tensor`. Must be one of the following types: `half`,
          `float32`, `float64`.
        axis: The dimension softmax would be performed on. The default is -1 which
          indicates the last dimension.
        name: A name for the operation (optional).
  
      Returns:
        A `Tensor`. Has the same type and shape as `logits`.
  
      Raises:
        InvalidArgumentError: if `logits` is empty or `axis` is beyond the last
          dimension of `logits`.
      """
      if axis is None:
          axis = -1
  
      with ops.name_scope(name, "RaggedSoftmax", [logits]) as name:
          max_input = reduce_max(logits, axis=axis, keepdims=True)
          logits_exp = math_ops.exp(
              math_ops.subtract(logits, max_input)
          )
          denominator = reduce_sum(logits_exp, axis=axis, keepdims=True)
          return math_ops.divide(logits_exp, denominator)
  
imports: import functools
  import typing
  import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import gen_ragged_math_ops
  from tensorflow.python.ops import map_fn
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops.ragged import ragged_functional_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged import segment_id_ops
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 27 for calling a global function with example usage: softmax(logits, axis, name) and returns: math_ops