code: def test_sparsemax_of_nan(dtype):
      """check sparsemax transfers nan."""
      z_nan = np.asarray(
          [
              [0, np.nan, 0],
              [0, np.nan, np.nan],
              [np.nan, np.nan, np.nan],
          ]
      ).astype(dtype)
  
      tf_sparsemax_nan = sparsemax(z_nan)
      np.testing.assert_equal(
          np.array(
              [
                  [np.nan, np.nan, np.nan],
                  [np.nan, np.nan, np.nan],
                  [np.nan, np.nan, np.nan],
              ]
          ),
          tf_sparsemax_nan,
      )
  
file_path: addons/tensorflow_addons/activations/tests/sparsemax_test.py
imports: import pytest
  import numpy
  import tensorflow
  from tensorflow_addons.activations import sparsemax
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 6 for calling a global function with example usage: test_sparsemax_of_nan(dtype) without return types