class_docstr: Test class for `DunnIndex` metric.
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def test_dunn_index(self, data, labels, p, ddp):
      """Test class implementation of metric."""
      self.run_class_metric_test(
          ddp=ddp,
          preds=data,
          target=labels,
          metric_class=DunnIndex,
          reference_metric=partial(_np_dunn_index, p=p),
          metric_args={"p": p},
      )
  
file_path: torchmetrics/tests/unittests/clustering/test_dunn_index.py
imports: from functools import partial
  from itertools import combinations
  import numpy
  import pytest
  from torchmetrics.clustering.dunn_index import DunnIndex
  from torchmetrics.functional.clustering.dunn_index import dunn_index
  from unittests.clustering.inputs import _single_target_intrinsic1, _single_target_intrinsic2
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 1 for calling the TestDunnIndex obj's underlying member method code with example usage: obj.test_dunn_index(data, labels, p, ddp) without return types