code: def _cache_dataset(
      url, name, extract_path=None, repeats=1, verbose=False
  ):
      """Download and unzip datasets from multiple mirrors or fallback sources.
  
      If url is string, will attempt to download and unzip from url, to extract_path.
      If url is list of str, will go through urls in order until a download succeeds.
  
      Parameters
      ----------
      url : string or list of string
          URL pointing to file to download
          files are expected to be at f"{url}/{name}.zip" for a string url
          or f"{url[i]}/{name}.zip" for a list of string urls
      extract_path : string, optional (default: None)
          path to extract downloaded zip to, None defaults
          to sktime/datasets/data
      repeats : int, optional (default: 1)
          number of times to try downloading from each url
      verbose : bool, optional (default: False)
          whether to print progress
  
      Returns
      -------
      extract_path : string or None
          if successful, string containing the path of the extracted file
      u : string
          url from which the dataset was downloaded
      repeat : int
          number of times it took to download the dataset from u
      If none of the attempts are successful, will raise RuntimeError
      """
      if isinstance(url, str):
          url = [url]
  
      for u in url:
          name_url = f"{u}/{name}.zip"
          for repeat in range(repeats):
              if verbose:
                  print(  # noqa: T201
                      f"Downloading dataset {name} from {u} to {extract_path}"
                      f"(attempt {repeat} of {repeats} total). "
                  )
  
              try:
                  _download_and_extract(
                      name_url, extract_path=extract_path
                  )
                  return extract_path, u, repeat
  
              except zipfile.BadZipFile:
                  if verbose:
                      if repeat < repeats - 1:
                          print(  # noqa: T201
                              "Download failed, continuing with next attempt. "
                          )
                      else:
                          print(  # noqa: T201
                              "All attempts for mirror failed, "
                              "continuing with next mirror."
                          )
  
      raise RuntimeError(
          f"Dataset with name ={name} could not be downloaded from any of the mirrors."
      )
  
file_path: sktime/sktime/datasets/_data_io.py
imports: import os
  import shutil
  import tempfile
  import zipfile
  from urllib.request import urlretrieve
  import numpy
  import pandas
  from sktime.datasets._readers_writers.ts import load_from_tsfile
  from sktime.datasets._readers_writers.utils import _alias_mtype_check
  from sktime.datatypes import convert
  from sktime.datatypes._panel._convert import _make_column_names
label_desc: Use image node_id 3 for calling a global function with example usage: _cache_dataset(url, name, extract_path, repeats, verbose) and returns: extract_path,  u,  repeat