code: def test_sparsemax_layer_against_numpy(dtype):
      """check sparsemax kernel against numpy."""
      random = np.random.RandomState(1)
  
      z = random.uniform(low=-3, high=3, size=(test_obs, 10)).astype(
          dtype
      )
  
      test_utils.layer_test(
          Sparsemax,
          kwargs={"dtype": dtype},
          input_data=z,
          expected_output=_np_sparsemax(z).astype(dtype),
      )
  
imports: import pytest
  import numpy
  from tensorflow_addons.layers import Sparsemax
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_sparsemax_layer_against_numpy(dtype) without return types