def METHOD_NAME(
    app_config: AppConfig, get_job_runner: GetJobRunner, max_number_of_configs: int, error_code: str
) -> None:
    dataset = "dataset"
    configs = ["config_1", "config_2"]
    job_runner = get_job_runner(
        dataset,
        replace(app_config, config_names=replace(app_config.config_names, max_number=max_number_of_configs)),
    )
    with patch("worker.job_runners.dataset.config_names.get_dataset_config_names", return_value=configs):
        if error_code:
            with pytest.raises(CustomError) as exc_info:
                job_runner.compute()
            assert exc_info.value.code == error_code
        else:
            assert job_runner.compute() is not None