code: def test_fit_with_error_gives_no_ensemble(
      builder: EnsembleBuilder,
      make_run: Callable[..., Run],
  ) -> None:
      """
      Expects
      -------
      * A run without predictions will raise an error will cause `fit_ensemble` to fail
        as it requires all runs to have valid predictions
      """
      X_data = builder.X_data("ensemble")
      targets = builder.targets("ensemble")
      assert targets is not None
  
      predictions = targets
  
      runs = [
          make_run(predictions={"ensemble": predictions})
          for _ in range(10)
      ]
      bad_run = make_run(predictions=None)
  
      runs.append(bad_run)
  
      with pytest.raises(FileNotFoundError):
          builder.fit_ensemble(
              candidates=runs, X_data=X_data, targets=targets, runs=runs
          )
  
imports: from __future__ import annotations
  from typing import Callable
  import random
  import time
  from pathlib import Path
  import numpy
  from autosklearn.automl_common.common.utils.backend import Backend
  from autosklearn.ensemble_building import EnsembleBuilder, Run
  from autosklearn.metrics import Scorer, accuracy, make_scorer
  from autosklearn.util.functional import bound, pairs
  import pytest
  from pytest_cases import fixture, parametrize
  from unittest.mock import Mock, patch
  from test.conftest import DEFAULT_SEED
  from test.fixtures.metrics import acc_with_X_data
label_desc: Use image node_id 26 for calling a global function with example usage: test_fit_with_error_gives_no_ensemble(builder, make_run) without return types