code: def fetch_attack(
      dataset: str, model: str, attack: str, return_X_y: bool = False
  ) -> Union[
      Bunch,
      Tuple[
          Tuple[np.ndarray, np.ndarray], Tuple[np.ndarray, np.ndarray]
      ],
  ]:
      """
      Load adversarial instances for a given dataset, model and attack type.
  
      Parameters
      ----------
      dataset
          Dataset under attack.
      model
          Model under attack.
      attack
          Attack name.
      return_X_y
          Bool, whether to only return the data and target values or a Bunch object.
  
      Returns
      -------
      Bunch
          Adversarial instances with original labels.
      (train data, train target), (test data, test target)
          Tuple of tuples if 'return_X_y' equals True.
      """
      # define paths
      url = "https://storage.googleapis.com/seldon-datasets/"
      path_attack = _join_url(url, [dataset, "attacks", model, attack])
      path_data = path_attack + ".npz"
      path_meta = path_attack + "_meta.pickle"
      # get adversarial instances and labels
      try:
          resp = requests.get(path_data, timeout=TIMEOUT)
          resp.raise_for_status()
      except RequestException:
          logger.exception(
              "Could not connect, URL may be out of service"
          )
          raise
      data = np.load(BytesIO(resp.content))
      X_train, X_test = data["X_train_adv"], data["X_test_adv"]
      y_train, y_test = data["y_train"], data["y_test"]
  
      if return_X_y:
          return (X_train, y_train), (X_test, y_test)
  
      # get metadata
      try:
          resp = requests.get(path_meta, timeout=TIMEOUT)
          resp.raise_for_status()
      except RequestException:
          logger.exception(
              "Could not connect, URL may be out of service"
          )
          raise
      meta = dill.load(BytesIO(resp.content))
      return Bunch(
          data_train=X_train,
          data_test=X_test,
          target_train=y_train,
          target_test=y_test,
          meta=meta,
      )
  
imports: import io
  import logging
  from io import BytesIO
  from typing import List, Tuple, Type, Union
  from xml.etree import ElementTree
  import dill
  import numpy
  import pandas
  import requests
  from alibi_detect.utils.data import Bunch
  from alibi_detect.utils.url import _join_url
  from requests import RequestException
  from urllib.error import URLError
  from scipy.io import arff
  from sklearn.datasets import fetch_kddcup99
label_desc: Use image node_id 7 for calling a global function with example usage: fetch_attack(dataset, model, attack, return_X_y) and returns: Bunch, X_train,  y_train,  X_test,  y_test