code: def test_fetch_cifar10c(return_X_y):
      corruption = list(
          np.random.choice(corruption_list, 5, replace=False)
      )
      try:
          data = fetch_cifar10c(
              corruption=corruption, severity=2, return_X_y=return_X_y
          )
      except RequestException:
          pytest.skip("CIFAR-10-C dataset URL down")
      if return_X_y:
          assert isinstance(data, tuple)
          assert isinstance(data[0], np.ndarray) and isinstance(
              data[1], np.ndarray
          )
      else:
          assert isinstance(data, Bunch)
          assert isinstance(data.data, np.ndarray) and isinstance(
              data.target, np.ndarray
          )
  
file_path: alibi-detect/alibi_detect/tests/test_datasets.py
imports: import numpy
  import pandas
  import pytest
  from requests import RequestException
  from urllib.error import URLError
  from alibi_detect.datasets import fetch_kdd, fetch_ecg, corruption_types_cifar10c, fetch_cifar10c, fetch_attack, fetch_nab, get_list_nab
  from alibi_detect.utils.data import Bunch
label_desc: Use image node_id 4 for calling a global function with example usage: test_fetch_cifar10c(return_X_y) without return types