code: def test_cohen_kappa_wrong_weights_type():
      with pytest.raises(
          ValueError, match=r"Kappa Weighting type must be"
      ):
          ck = CohenKappa(weights=7)
  
      with pytest.raises(
          ValueError, match=r"Kappa Weighting type must be"
      ):
          ck = CohenKappa(weights="dd")
  
imports: import os
  from unittest.mock import patch
  import pytest
  import sklearn
  import torch
  from sklearn.metrics import cohen_kappa_score
  import ignite.distributed
  from ignite.contrib.metrics import CohenKappa
  from ignite.engine import Engine
  from ignite.exceptions import NotComputableError
label_desc: Use image node_id 6 for calling a global function with example usage: test_cohen_kappa_wrong_weights_type() without return types