code: def test_ideal_case_metrics(
      metric: ClassificationMetricsEnum,
      pipeline_func: Callable[[], Pipeline],
      validation_blocks: Union[int, None],
      data_setup: Tuple[InputData, InputData, str],
      expected_values,
  ):
      reference, _, task_type, _ = data_setup
      metric_class = MetricsRepository.get_metric_class(metric)
      predicted = OutputData(
          idx=reference.idx,
          task=reference.task,
          data_type=reference.data_type,
      )
      if (
          task_type == "multiclass"
          and metric_class.output_mode != "labels"
      ):
          label_vals = np.unique(reference.target)
          predicted.predict = np.identity(len(label_vals))[
              reference.target
          ]
      else:
          predicted.predict = reference.target
      if task_type == "multits":
          reference.features = reference.features[:, 0]
  
      ideal_value = metric_class.metric(reference, predicted)
  
      assert ideal_value != metric_class.default_value
  
imports: import json
  import sys
  from itertools import product
  from typing import Callable, Dict, Tuple, Union
  import numpy
  import pandas
  import pytest
  from sklearn.datasets import load_breast_cancer, load_diabetes, load_linnerud, load_wine
  from fedot.core.composer.metrics import QualityMetric, ROCAUC
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.metrics_repository import ClassificationMetricsEnum, ComplexityMetricsEnum, MetricsRepository, RegressionMetricsEnum, TimeSeriesForecastingMetricsEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
  from fedot.core.utils import fedot_project_root, set_random_seed
label_desc: Use image node_id 8 for calling a global function with example usage: test_ideal_case_metrics(metric, pipeline_func, validation_blocks, data_setup, expected_values) without return types