code: def gen_labels_and_preds(num_samples, num_classes, seed):
      np.random.seed(seed)
      rands = np.random.uniform(size=(num_samples, num_classes))
      cat_labels = rands.argmax(axis=1)
      y_true = np.eye(num_classes, dtype="int")[cat_labels]
      y_pred = np.random.uniform(size=(num_samples, num_classes))
      y_pred /= y_pred.sum(axis=1, keepdims=True)
      return y_true, y_pred
  
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 2 for calling a global function with example usage: gen_labels_and_preds(num_samples, num_classes, seed) and returns: y_true,  y_pred