code: def test_serialization():
      ref_fn = sparsemax_loss
  
      # TODO: Remove after 2.13 is oldest version supported due to new serialization
      if Version(tf.__version__) >= Version("2.13"):
          config = tf.keras.losses.serialize(
              ref_fn, use_legacy_format=True
          )
      else:
          config = tf.keras.losses.serialize(ref_fn)
      fn = tf.keras.losses.deserialize(config)
      assert ref_fn.__name__ == fn.__name__
  
file_path: addons/tensorflow_addons/losses/tests/sparsemax_loss_test.py
imports: import pytest
  from packaging.version import Version
  import tensorflow
  import numpy
  from tensorflow_addons.activations import sparsemax
  from tensorflow_addons.losses import sparsemax_loss, SparsemaxLoss
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 13 for calling a global function with example usage: test_serialization() without return types