def METHOD_NAME(
    app_config: AppConfig,
    get_job_runner: GetJobRunner,
    dataset: str,
    config_names_status: HTTPStatus,
    config_names_content: Any,
    config_upstream_status: List[HTTPStatus],
    config_upstream_content: List[Any],
    expected_error_code: str,
    expected_content: Any,
    should_raise: bool,
) -> None:
    upsert_response(
        kind="dataset-config-names",
        dataset=dataset,
        content=config_names_content,
        http_status=config_names_status,
    )
    if config_names_status == HTTPStatus.OK:
        for split_item, status, content in zip(
            config_names_content["config_names"], config_upstream_status, config_upstream_content
        ):
            upsert_response(
                kind="config-opt-in-out-urls-count",
                dataset=dataset,
                config=split_item["config"],
                content=content,
                http_status=status,
            )
    job_runner = get_job_runner(dataset, app_config)
    if should_raise:
        with pytest.raises(Exception) as e:
            job_runner.compute()
        assert e.typename == expected_error_code
    else:
        assert job_runner.compute().content == expected_content