code: def test_raises_if_no_metric_set(
      make_automl: Callable[..., AutoML]
  ) -> None:
      """
      Expects
      -------
      * raise if there was no metric set when calling `_do_dummy_prediction()`
      """
      automl = make_automl()
      with pytest.raises(
          ValueError, match="Metric/Metrics was/were not set"
      ):
          automl._do_dummy_prediction()
  
file_path: auto-sklearn/test/test_automl/test_dummy_predictions.py
imports: from __future__ import annotations
  from typing import Callable, Sequence, Tuple
  from pathlib import Path
  import numpy
  from smac.tae import StatusType
  from autosklearn.automl import AutoML
  from autosklearn.constants import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION
  from autosklearn.data.xy_data_manager import XYDataManager
  from autosklearn.metrics import Scorer, accuracy, log_loss, precision, r2
  from autosklearn.util.logging_ import PicklableClientLogger
  import pytest
  from pytest_cases import parametrize
  from unittest.mock import patch
label_desc: Use image node_id 4 for calling a global function with example usage: test_raises_if_no_metric_set(make_automl) without return types