code: def test_kappa_perfect_score():
      actuals = [4, 4, 3, 3, 2, 2, 1, 1]
      preds = [4, 4, 3, 3, 2, 2, 1, 1]
      actuals = tf.constant(actuals, dtype=tf.int32)
      preds = tf.constant(preds, dtype=tf.int32)
  
      # Initialize
      kp_obj1, kp_obj2, kp_obj3 = initialize_vars()
  
      # Update
      update_obj_states(kp_obj1, kp_obj2, kp_obj3, actuals, preds, None)
  
      # Check results
      check_results([kp_obj1, kp_obj2, kp_obj3], [1.0, 1.0, 1.0])
  
imports: import pytest
  import numpy
  import tensorflow
  from tensorflow_addons.metrics import CohenKappa
  from tensorflow_addons.testing.serialization import check_metric_serialization
label_desc: Use image node_id 7 for calling a global function with example usage: test_kappa_perfect_score() without return types