class_docstr: Test class for `Dice` metric in multi-class setting..
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def test_dice_class(self, ddp, preds, target, ignore_index):
      """Test class implementation of metric."""
      self.run_class_metric_test(
          ddp=ddp,
          preds=preds,
          target=target,
          metric_class=Dice,
          reference_metric=partial(
              _scipy_dice, ignore_index=ignore_index
          ),
          metric_args={"ignore_index": ignore_index},
      )
  
imports: from functools import partial
  from typing import Optional
  import pytest
  from scipy.spatial.distance import dice
  from torch import Tensor, tensor
  from torchmetrics.classification import Dice
  from torchmetrics.functional import dice
  from torchmetrics.functional.classification.stat_scores import _del_column
  from torchmetrics.utilities.checks import _input_format_classification
  from torchmetrics.utilities.enums import DataType
  from unittests.classification.inputs import _input_binary, _input_binary_logits, _input_binary_prob
  from unittests.classification.inputs import _input_multiclass
  from unittests.classification.inputs import _input_multiclass_logits
  from unittests.classification.inputs import _input_multiclass_prob
  from unittests.classification.inputs import _input_multiclass_with_missing_class
  from unittests.classification.inputs import _input_multilabel
  from unittests.classification.inputs import _input_multilabel_logits
  from unittests.classification.inputs import _input_multilabel_multidim
  from unittests.classification.inputs import _input_multilabel_multidim_prob
  from unittests.classification.inputs import _input_multilabel_prob
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 1 for calling the TestDiceMulti obj's underlying member method code with example usage: obj.test_dice_class(ddp, preds, target, ignore_index) without return types