code: def test_support_for_int():
      """See issue: https://github.com/Lightning-AI/torchmetrics/issues/1970."""
      metric = MulticlassStatScores(
          num_classes=4,
          average="none",
          multidim_average="samplewise",
          ignore_index=0,
      )
      prediction = torch.randint(low=0, high=4, size=(1, 224, 224)).to(
          torch.uint8
      )
      label = torch.randint(low=0, high=4, size=(1, 224, 224)).to(
          torch.uint8
      )
      score = metric(preds=prediction, target=label)
      assert score.shape == (1, 4, 5)
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from sklearn.metrics import confusion_matrix
  from torchmetrics.classification.stat_scores import BinaryStatScores, MulticlassStatScores, MultilabelStatScores, StatScores
  from torchmetrics.functional.classification.stat_scores import binary_stat_scores, multiclass_stat_scores, multilabel_stat_scores
  from torchmetrics.metric import Metric
  from unittests import NUM_CLASSES, THRESHOLD
  from unittests.classification.inputs import _binary_cases, _multiclass_cases, _multilabel_cases
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester, inject_ignore_index, remove_ignore_index
label_desc: Use image node_id 9 for calling a global function with example usage: test_support_for_int() without return types