code: def test_save_model(tmpdir):
      model = tf.keras.models.Sequential(
          [
              tf.keras.layers.Input((256, 256, 3)),
              tf.keras.layers.Dense(6, activation="softmax"),
          ]
      )
      model.compile(
          optimizer="adam", loss=WeightedKappaLoss(num_classes=6)
      )
      model.save(str(tmpdir / "test.h5"))
  
file_path: addons/tensorflow_addons/losses/tests/kappa_loss_test.py
imports: import pytest
  import numpy
  import tensorflow
  from tensorflow_addons.losses.kappa_loss import WeightedKappaLoss
label_desc: Use image node_id 7 for calling a global function with example usage: test_save_model(tmpdir) without return types