code: def test_pipeline_objective_evaluate_with_invalid_metrics(
      classification_dataset, metrics
  ):
      with pytest.raises(Exception):
          pipeline = sample_pipeline()
  
          data_producer = DataSourceSplitter(cv_folds=None).build(
              classification_dataset
          )
          objective_eval = PipelineObjectiveEvaluate(
              MetricsObjective(metrics), data_producer=data_producer
          )
          objective_eval(pipeline)
  
imports: import datetime
  from copy import deepcopy
  import numpy
  import pytest
  from golem.core.optimisers.fitness import SingleObjFitness
  from fedot.core.data.data import InputData
  from fedot.core.data.supplementary_data import SupplementaryData
  from fedot.core.optimisers.objective import PipelineObjectiveEvaluate
  from fedot.core.optimisers.objective.data_source_splitter import DataSourceSplitter
  from fedot.core.optimisers.objective.metrics_objective import MetricsObjective
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.pipeline_builder import PipelineBuilder
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.metrics_repository import ClassificationMetricsEnum, MetricsRepository, RegressionMetricsEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from test.integration.models.test_model import classification_dataset, classification_dataset_with_str_labels
  from test.unit.tasks.test_forecasting import get_simple_ts_pipeline
  from test.unit.validation.test_table_cv import sample_pipeline
  from test.unit.validation.test_time_series_cv import configure_experiment
label_desc: Use image node_id 14 for calling a global function with example usage: test_pipeline_objective_evaluate_with_invalid_metrics(classification_dataset, metrics) without return types