class_docstr: Test class for metrics tests.
class_docstr_tok: ["Test","class","for","metrics","tests","."]
code: def check_kappa(
      self, y_true, y_pred, weights, allow_off_by_one, expected
  ):
      assert_almost_equal(
          kappa(
              y_true,
              y_pred,
              weights=weights,
              allow_off_by_one=allow_off_by_one,
          ),
          expected,
      )
  
file_path: skll/tests/test_metrics.py
imports: import unittest
  from pathlib import Path
  from numpy.testing import assert_almost_equal
  from sklearn.metrics import fbeta_score
  from skll.metrics import kappa, use_score_func
  from skll.utils.testing import output_dir, test_dir, train_dir
label_desc: Use image node_id 2 for calling the TestMetrics obj's underlying member method code with example usage: obj.check_kappa(y_true, y_pred, weights, allow_off_by_one, expected) without return types