code: def _multiclass_cohen_kappa_arg_validation(
      num_classes: int,
      ignore_index: Optional[int] = None,
      weights: Optional[Literal["linear", "quadratic", "none"]] = None,
  ) -> None:
      """Validate non tensor input.
  
      - ``num_classes`` has to be a int larger than 1
      - ``ignore_index`` has to be None or int
      - ``weights`` has to be "linear" | "quadratic" | "none" | None
  
      """
      _multiclass_confusion_matrix_arg_validation(
          num_classes, ignore_index, normalize=None
      )
      allowed_weights = ("linear", "quadratic", "none", None)
      if weights not in allowed_weights:
          raise ValueError(
              f"Expected argument `weight` to be one of {allowed_weights}, but got {weights}."
          )
  
file_path: torchmetrics/src/torchmetrics/functional/classification/cohen_kappa.py
imports: from typing import Optional
  import torch
  from torch import Tensor
  from typing_extensions import Literal
  from torchmetrics.functional.classification.confusion_matrix import _binary_confusion_matrix_arg_validation, _binary_confusion_matrix_format, _binary_confusion_matrix_tensor_validation, _binary_confusion_matrix_update, _multiclass_confusion_matrix_arg_validation, _multiclass_confusion_matrix_format, _multiclass_confusion_matrix_tensor_validation, _multiclass_confusion_matrix_update
  from torchmetrics.utilities.enums import ClassificationTaskNoMultilabel
label_desc: Use image node_id 4 for calling a global function with example usage: _multiclass_cohen_kappa_arg_validation(num_classes, ignore_index, weights) without return types