code: def test_sparsemax_against_numpy_low_rank(dtype):
      """check sparsemax kernel against numpy."""
      random = np.random.RandomState(1)
  
      z = random.uniform(low=-3, high=3, size=(10))
  
      tf_sparsemax_out = sparsemax(z.astype(dtype)).numpy()
      np_sparsemax = np.reshape(
          _np_sparsemax(np.reshape(z, [1, 10])), [10]
      ).astype(dtype)
  
      test_utils.assert_allclose_according_to_type(
          np_sparsemax, tf_sparsemax_out, half_atol=5e-3
      )
      assert np_sparsemax.shape == tf_sparsemax_out.shape
  
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 3 for calling a global function with example usage: test_sparsemax_against_numpy_low_rank(dtype) without return types