code: def _multiclass_calibration_error_tensor_validation(
      preds: Tensor,
      target: Tensor,
      num_classes: int,
      ignore_index: Optional[int] = None,
  ) -> None:
      _multiclass_confusion_matrix_tensor_validation(
          preds, target, num_classes, ignore_index
      )
      if not preds.is_floating_point():
          raise ValueError(
              "Expected argument `preds` to be floating tensor with probabilities/logits"
              f" but got tensor with dtype {preds.dtype}"
          )
  
file_path: torchmetrics/src/torchmetrics/functional/classification/calibration_error.py
imports: from typing import Optional, Tuple, Union
  import torch
  from torch import Tensor
  from typing_extensions import Literal
  from torchmetrics.functional.classification.confusion_matrix import _binary_confusion_matrix_format, _binary_confusion_matrix_tensor_validation, _multiclass_confusion_matrix_format, _multiclass_confusion_matrix_tensor_validation
  from torchmetrics.utilities.enums import ClassificationTaskNoMultilabel
label_desc: Use image node_id 8 for calling a global function with example usage: _multiclass_calibration_error_tensor_validation(preds, target, num_classes, ignore_index) without return types