code: def download_data(url):
      def _wrapper(Dataset):
          def _check_download():
              save_name = os.path.basename(url).split(".")[0]
              output_path = os.path.join(hubenv.DATA_HOME, save_name)
              lock = filelock.FileLock(
                  os.path.join(hubenv.TMP_HOME, save_name)
              )
              with lock:
                  if not os.path.exists(output_path):
                      default_downloader.download_file_and_uncompress(
                          url, hubenv.DATA_HOME, True
                      )
  
          class WrapperDataset(Dataset):
              def __new__(cls, *args, **kwargs):
                  _check_download()
                  return super(WrapperDataset, cls).__new__(cls)
  
          return WrapperDataset
  
      return _wrapper
  
file_path: PaddleHub/paddlehub/utils/download.py
imports: import os
  import filelock
  import paddlehub.env
  from paddle.utils.download import get_path_from_url
  from paddlehub.utils import log, utils, xarfile
label_desc: Use image node_id 1 for calling a global function with example usage: download_data(url) and returns: _wrapper, WrapperDataset, super