code: def test_linear_weighted_kappa_loss(np_seed):
      y_true, y_pred = gen_labels_and_preds(50, 4, np_seed)
      kappa_loss = WeightedKappaLoss(num_classes=4, weightage="linear")
      y_pred = y_pred.astype(np.float32)
      loss = kappa_loss(y_true, y_pred)
      loss_np = weighted_kappa_loss_np(
          y_true, y_pred, weightage="linear"
      )
      np.testing.assert_allclose(loss, loss_np, rtol=1e-5, atol=1e-5)
  
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 3 for calling a global function with example usage: test_linear_weighted_kappa_loss(np_seed) without return types