class_docstr: Test class for `MulticlassROC` metric.
class_docstr_tok: ["Test","class","for","`","MulticlassROC","`","metric","."]
docstr: Test that different types of `thresholds` argument lead to same result.
code: def test_multiclass_roc_threshold_arg(self, inputs, threshold_fn):
      """Test that different types of `thresholds` argument lead to same result."""
      preds, target = inputs
      for pred, true in zip(preds, target):
          p1, r1, t1 = multiclass_roc(
              pred, true, num_classes=NUM_CLASSES, thresholds=None
          )
          for i, t in enumerate(t1):
              p2, r2, t2 = multiclass_roc(
                  pred,
                  true,
                  num_classes=NUM_CLASSES,
                  thresholds=threshold_fn(t.flip(0)),
              )
  
              assert torch.allclose(p1[i], p2[i])
              assert torch.allclose(r1[i], r2[i])
              assert torch.allclose(t1[i], t2)
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from scipy.special import softmax
  from sklearn.metrics import roc_curve
  from torchmetrics.classification.roc import ROC, BinaryROC, MulticlassROC, MultilabelROC
  from torchmetrics.functional.classification.roc import binary_roc, multiclass_roc, multilabel_roc
  from torchmetrics.metric import Metric
  from unittests import NUM_CLASSES
  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 6 for calling the TestMulticlassROC obj's underlying member method code with example usage: obj.test_multiclass_roc_threshold_arg(inputs, threshold_fn) without return types