code: def test_normalized_mutual_info_score_functional_raises_invalid_task(
      average_method,
  ):
      """Check that metric rejects continuous-valued inputs."""
      preds, target = _float_inputs_extrinsic
      with pytest.raises(ValueError, match=r"Expected *"):
          normalized_mutual_info_score(preds, target, 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 a global function with example usage: test_normalized_mutual_info_score_functional_raises_invalid_task(average_method) without return types