code: def log_softmax(
      data,
      axis=-1,
      length=None,
      temperature=None,
      use_length=False,
      dtype=None,
  ):
      r"""Computes the log softmax of the input.
      This is equivalent to computing softmax followed by log.
  
      Parameters
      ----------
      data : NDArray
          The input array.
      axis : int, optional, default='-1'
          The axis along which to compute softmax.
      length : NDArray
          The length array.
      temperature : double or None, optional, default=None
          Temperature parameter in softmax
      dtype : {None, 'float16', 'float32', 'float64'},optional, default='None'
          DType of the output in case this can't be inferred. Defaults to
          the same as input's dtype if not defined (dtype=None).
      use_length : boolean or None, optional, default=0
          Whether to use the length input as a mask over the data input.
  
      Returns
      -------
      out : NDArray or list of NDArrays
          The output of this function.
  
      Examples
      --------
      >>> data = np.array([1, 2, .1])
      >>> npx.log_softmax(data)
      array([-1.4170278, -0.4170278, -2.3170278])
      >>> data = np.array([[1, 2, .1],[.1, 2, 1]])
      >>> npx.log_softmax(data, axis=0)
      array([[-0.34115386, -0.6931472 , -1.2411538 ],
          [-1.2411538 , -0.6931472 , -0.34115386]])
      """
      if dtype and not isinstance(dtype, str):
          dtype = get_dtype_name(dtype)
      if use_length:
          assert length is not None, "Missing length input"
          return _api_internal.log_softmax(
              data, length, axis, temperature, True, dtype
          )
      else:
          assert length is None, "Length input is not used"
          return _api_internal.log_softmax(
              data, axis, temperature, False, dtype
          )
  
imports: import numpy
  from .._internal import NDArrayBase
  from .None import _api_internal
  from ...util import set_module
  from ..ndarray import get_dtype_name
label_desc: Use image node_id 2 for calling a global function with example usage: log_softmax(data, axis, length, temperature, use_length, dtype) and returns: _api_internal, _api_internal