code: def google_bucket_list(
      url: str,
      folder: str,
      filetype: str = None,
      full_path: bool = False,
  ) -> List[str]:
      """
      Retrieve list with items in google bucket folder.
  
      Parameters
      ----------
      url
          Bucket directory.
      folder
          Folder to retrieve list of items from.
      filetype
          File extension, e.g. `npy` for saved numpy arrays.
  
      Returns
      -------
      List with items in the folder of the google bucket.
      """
      try:
          resp = requests.get(url, timeout=TIMEOUT)
          resp.raise_for_status()
      except RequestException:
          logger.exception(
              "Could not connect, URL may be out of service"
          )
          raise
      root = ElementTree.fromstring(resp.content)
      bucket_list = []
      for r in root:
          if list(r):
              filepath = r[0].text
              if filetype is not None:
                  if filepath.startswith(folder) and filepath.endswith(
                      filetype
                  ):
                      istart, istop = filepath.find(
                          "/"
                      ) + 1, filepath.find(".")
                      bucket_list.append(filepath[istart:istop])
              else:
                  if filepath.startswith(folder):
                      istart, istop = filepath.find(
                          "/"
                      ) + 1, filepath.find(".")
                      bucket_list.append(filepath[istart:istop])
      return bucket_list
  
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 5 for calling a global function with example usage: google_bucket_list(url, folder, filetype, full_path) and returns: bucket_list