code: def _tf_sparsemax_loss(z, q, dtype):
      z = z.astype(dtype)
      q = q.astype(dtype)
  
      tf_sparsemax_op = sparsemax(z)
      tf_loss_op = sparsemax_loss(z, tf_sparsemax_op, q)
      tf_loss_out = tf_loss_op
  
      return tf_loss_op, tf_loss_out
  
file_path: addons/tensorflow_addons/losses/tests/sparsemax_loss_test.py
imports: import pytest
  from packaging.version import Version
  import tensorflow
  import numpy
  from tensorflow_addons.activations import sparsemax
  from tensorflow_addons.losses import sparsemax_loss, SparsemaxLoss
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 5 for calling a global function with example usage: _tf_sparsemax_loss(z, q, dtype) and returns: tf_loss_op,  tf_loss_out