code: def download_dataset(
      dataset_url, dataset_path, data_home=None, verbose=True
  ):
      """Downloads dataset from given URL and stores it locally
  
      Parameters
      ----------
      dataset_url : `str`
          URL of the dataset, for example
          "https://archive.ics.uci.edu/ml/machine-learning-databases/url/url_svmlight.tar.gz"
      dataset_path : `str`
          Path at which the dataset will be saved in the `data_home` folder
      data_home : `str`, optional, default=None
          Specify a download and cache folder for the datasets. If None
          and not configured with TICK_DATASETS environement variable
          all tick datasets are stored in '~/tick_datasets' subfolders.
      verbose : `bool`, default=True
          If True, download progress bar will be printed
      Returns
      -------
      cache_path : `str`
          File path of the downloaded data
      """
      data_home = get_data_home(data_home)
      cache_path = os.path.join(data_home, dataset_path)
      cache_dir = os.path.dirname(cache_path)
  
      if not os.path.exists(cache_dir):
          os.makedirs(cache_dir)
  
      if verbose:
          logger.warning("Downloading dataset from %s", dataset_url)
      opener = urlopen(dataset_url)
      chunk_size = 4096
      with open(cache_path, "wb") as f:
          n_chunks = 0
          file_size = opener.length
          last_percent = -1
          while True:
              data = opener.read(chunk_size)
              if data:
                  percent = chunk_size * n_chunks / file_size
                  if verbose:
                      progress_bar(
                          percent,
                          length=file_size,
                          last_progress=last_percent,
                      )
                      last_percent = percent
                  f.write(data)
                  n_chunks += 1
              else:
                  if verbose:
                      progress_bar(1, length=file_size)
                  break
  
      return cache_path
  
file_path: tick/tick/dataset/download_helper.py
imports: import logging
  from urllib.request import urlopen
  import os
  import shutil
  import numpy
  from sklearn.datasets import load_svmlight_file
  import math
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: download_dataset(dataset_url, dataset_path, data_home, verbose) and returns: cache_path