class_docstr: Test class for `NormalizedMutualInfoScore` metric.
class_docstr_tok: ["Test","class","for","`","NormalizedMutualInfoScore","`","metric","."]
docstr: Test functional implementation of metric.
docstr_tok: ["Test","functional","implementation","of","metric","."]
code: def test_normalized_mutual_info_score_functional(
      self, preds, target, average_method
  ):
      """Test functional implementation of metric."""
      self.run_functional_metric_test(
          preds=preds,
          target=target,
          metric_functional=normalized_mutual_info_score,
          reference_metric=partial(
              sklearn_nmi, average_method=average_method
          ),
          average_method=average_method,
      )
  
file_path: torchmetrics/tests/unittests/clustering/test_normalized_mutual_info_score.py
imports: from functools import partial
  import pytest
  import torch
  from sklearn.metrics import normalized_mutual_info_score
  from torchmetrics.clustering import NormalizedMutualInfoScore
  from torchmetrics.functional.clustering import normalized_mutual_info_score
  from unittests import BATCH_SIZE, NUM_CLASSES
  from unittests.clustering.inputs import _float_inputs_extrinsic, _single_target_extrinsic1, _single_target_extrinsic2
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 2 for calling the TestNormalizedMutualInfoScore obj's underlying member method code with example usage: obj.test_normalized_mutual_info_score_functional(preds, target, average_method) without return types