code: def test_at_least_one_model_and_predictions(automl: AutoML) -> None:
      """
      Expects
      -------
      * There should be at least one models saved
      * Each model saved should have predictions for the ensemble
      """
      assert automl._backend is not None
      runs_dir = Path(automl._backend.get_runs_directory())
  
      runs = list(runs_dir.iterdir())
      assert len(runs) > 0
  
      at_least_one = False
      for run in runs:
          prediction_files = run.glob("predictions_ensemble*.npy")
          model_files = run.glob("*.*.model")
  
          if any(prediction_files):
              at_least_one = True
              assert any(
                  model_files
              ), "Run produced prediction but no model"
  
      assert at_least_one, "No runs produced predictions"
  
file_path: auto-sklearn/test/test_automl/test_post_fit.py
imports: from pathlib import Path
  from autosklearn.automl import AutoML
  from autosklearn.ensemble_building.builder import CANDIDATES_FILENAME
  from pytest import mark
  from pytest_cases import parametrize_with_cases
  from pytest_cases.filters import has_tag
  import test.test_automl.cases
  from test.conftest import DEFAULT_SEED
label_desc: Use image node_id 7 for calling a global function with example usage: test_at_least_one_model_and_predictions(automl) without return types