code: def test_two_dimentional(dtype):
      """check two dimentation sparsemax case."""
      t = np.linspace(-2, 2, test_obs, dtype=dtype)
      z = np.vstack([t, np.zeros(test_obs, dtype=dtype)]).T
  
      tf_sparsemax_out = sparsemax(z.astype(dtype)).numpy()
  
      p0_expected = np.select(
          [t < -1, t <= 1, t > 1], [0, (t + 1) / 2, 1]
      )
  
      test_utils.assert_allclose_according_to_type(
          p0_expected, tf_sparsemax_out[:, 0]
      )
      test_utils.assert_allclose_according_to_type(
          1 - p0_expected, tf_sparsemax_out[:, 1]
      )
      assert z.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 11 for calling a global function with example usage: test_two_dimentional(dtype) without return types