code: def test_fetch_nab(return_X_y):
      idx = np.random.choice(len(files))
      try:
          data = fetch_nab(files[idx], return_X_y=return_X_y)
      except RequestException:
          pytest.skip("NAB dataset URL down")
      if return_X_y:
          assert isinstance(data, tuple)
          assert isinstance(data[0], pd.DataFrame) and isinstance(
              data[1], pd.DataFrame
          )
      else:
          assert isinstance(data, Bunch)
          assert isinstance(data.data, pd.DataFrame) and isinstance(
              data.target, pd.DataFrame
          )
  
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 7 for calling a global function with example usage: test_fetch_nab(return_X_y) without return types