code: def test_compute_splits_response_simple_csv(
      hub_responses_public: HubDatasetTest,
      hub_responses_audio: HubDatasetTest,
      hub_responses_gated: HubDatasetTest,
      hub_responses_private: HubDatasetTest,
      hub_responses_empty: HubDatasetTest,
      hub_responses_does_not_exist: HubDatasetTest,
      get_job_runner: GetJobRunner,
      name: str,
      use_token: bool,
      error_code: str,
      cause: str,
      app_config: AppConfig,
  ) -> None:
      hub_datasets = {
          "public": hub_responses_public,
          "audio": hub_responses_audio,
          "gated": hub_responses_gated,
          "private": hub_responses_private,
          "empty": hub_responses_empty,
          "does_not_exist": hub_responses_does_not_exist,
      }
      dataset = hub_datasets[name]["name"]
      expected_configs_response = hub_datasets[name][
          "config_names_response"
      ]
      job_runner = get_job_runner(
          dataset,
          app_config
          if use_token
          else replace(
              app_config,
              common=replace(app_config.common, hf_token=None),
          ),
      )
      if error_code is None:
          result = job_runner.compute().content
          assert result == expected_configs_response
          return
  
      with pytest.raises(CustomError) as exc_info:
          job_runner.compute()
      assert exc_info.value.code == error_code
      assert exc_info.value.cause_exception == cause
      if exc_info.value.disclose_cause:
          response = exc_info.value.as_response()
          assert set(response.keys()) == {
              "error",
              "cause_exception",
              "cause_message",
              "cause_traceback",
          }
          response_dict = dict(response)
          # ^ to remove mypy warnings
          assert response_dict["cause_exception"] == cause
          assert isinstance(response_dict["cause_traceback"], list)
          assert (
              response_dict["cause_traceback"][0]
              == "Traceback (most recent call last):\n"
          )
  
file_path: datasets-server/services/worker/tests/job_runners/dataset/test_config_names.py
imports: from collections.abc import Callable
  from dataclasses import replace
  from unittest.mock import patch
  import pytest
  from libcommon.exceptions import CustomError
  from libcommon.resources import CacheMongoResource, QueueMongoResource
  from libcommon.utils import Priority
  from worker.config import AppConfig
  from worker.job_runners.dataset.config_names import DatasetConfigNamesJobRunner
  from worker.resources import LibrariesResource
  from ...fixtures.hub import HubDatasetTest
  from ..utils import REVISION_NAME
label_desc: Use image node_id 4 for calling a global function with example usage: test_compute_splits_response_simple_csv(hub_responses_public, hub_responses_audio, hub_responses_gated, hub_responses_private, hub_responses_empty, hub_responses_does_not_exist, get_job_runner, name, use_token, error_code, cause, app_config) without return types