code: def test_homogeneity_completeness_vmeasure_functional_raises_invalid_task(
      functional_metric,
  ):
      """Check that metric rejects continuous-valued inputs."""
      preds, target = _float_inputs_extrinsic
      with pytest.raises(ValueError, match=r"Expected *"):
          functional_metric(preds, target)
  
file_path: torchmetrics/tests/unittests/clustering/test_homogeneity_completeness_v_measure.py
imports: from functools import partial
  import pytest
  from sklearn.metrics import completeness_score
  from sklearn.metrics import homogeneity_score
  from sklearn.metrics import v_measure_score
  from torchmetrics.clustering.homogeneity_completeness_v_measure import CompletenessScore, HomogeneityScore, VMeasureScore
  from torchmetrics.functional.clustering.homogeneity_completeness_v_measure import completeness_score, homogeneity_score, v_measure_score
  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_homogeneity_completeness_vmeasure_functional_raises_invalid_task(functional_metric) without return types