code: def test_permutation(dtype):
      """check sparsemax proposition 3."""
      random = np.random.RandomState(6)
  
      z = random.uniform(low=-3, high=3, size=(test_obs, 10))
      p = sparsemax(z.astype(dtype)).numpy()
  
      for i in range(test_obs):
          per = random.permutation(10)
  
          tf_sparsemax_out = sparsemax(
              z[i, per].reshape(1, -1).astype(dtype)
          )
          p_expected = p[i, per].reshape(1, -1)
  
          test_utils.assert_allclose_according_to_type(
              p_expected, tf_sparsemax_out, half_atol=5e-3
          )
          assert p_expected.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 13 for calling a global function with example usage: test_permutation(dtype) without return types