code: def _multiclass_jaccard_index_arg_validation(
      num_classes: int,
      ignore_index: Optional[int] = None,
      average: Optional[
          Literal["micro", "macro", "weighted", "none"]
      ] = None,
  ) -> None:
      _multiclass_confusion_matrix_arg_validation(
          num_classes, ignore_index
      )
      allowed_average = ("micro", "macro", "weighted", "none", None)
      if average not in allowed_average:
          raise ValueError(
              f"Expected argument `average` to be one of {allowed_average}, but got {average}."
          )
  
file_path: torchmetrics/src/torchmetrics/functional/classification/jaccard.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, _multilabel_confusion_matrix_arg_validation, _multilabel_confusion_matrix_format, _multilabel_confusion_matrix_tensor_validation, _multilabel_confusion_matrix_update
  from torchmetrics.utilities.compute import _safe_divide
  from torchmetrics.utilities.enums import ClassificationTask
label_desc: Use image node_id 3 for calling a global function with example usage: _multiclass_jaccard_index_arg_validation(num_classes, ignore_index, average) without return types