code: def masked_softmax(
      data, mask, axis=-1, temperature=1.0, normalize=True
  ):
      r"""Applies the softmax function masking elements according to the mask provided
  
      Parameters
      ----------
      data : NDArray
          The input array.
      mask : NDArray
          Mask to apply.
      axis : int, optional, default='-1'
          The axis along which to compute softmax.
      temperature : double or None, optional, default=None
          Temperature parameter in softmax
      normalize : boolean or None, optional, default=1
          Whether to normalize input data x: x = x - max(x)
  
      Returns
      -------
      out : NDArray or list of NDArrays
          The output of this function.
  
      Examples
      --------
      >>> data = np.arange(5)
      >>> mask = np.array([1, 0, 1, 0, 1])
      >>> npx.masked_softmax(data, mask)
      array([0.01587624, 0.        , 0.11731042, 0.        , 0.8668133 ])
      >>> data = np.arange(10).reshape((2, 5))
      >>> npx.masked_softmax(data, mask, axis=0)
      array([[0.00669285, 0.        , 0.00669285, 0.        , 0.00669285],
             [0.9933072 , 0.        , 0.9933072 , 0.        , 0.9933072 ]])
      """
      assert (
          data is not None and mask is not None
      ), "Missing input data and mask"
      return _api_internal.masked_softmax(
          data, mask, axis, temperature, normalize
      )
  
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 3 for calling a global function with example usage: masked_softmax(data, mask, axis, temperature, normalize) and returns: _api_internal