code: def test_constant_add(dtype):
      """check sparsemax proposition 2."""
      random = np.random.RandomState(5)
  
      z = random.uniform(low=-3, high=3, size=(test_obs, 10)).astype(
          dtype
      )
      c = random.uniform(low=-3, high=3, size=(test_obs, 1)).astype(
          dtype
      )
  
      tf_sparsemax_zpc = sparsemax((z + c))
  
      tf_sparsemax_z = sparsemax(z)
  
      test_utils.assert_allclose_according_to_type(
          tf_sparsemax_zpc, tf_sparsemax_z, half_atol=5e-3
      )
  
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 10 for calling a global function with example usage: test_constant_add(dtype) without return types