code: def url_data(
      url,
      path=None,
      overwrite=False,
      overwrite_folder=False,
      sha1_hash=None,
      root=None,
      disp_depth=1,
  ):
      """Download dataset with a given URL
  
      Parameters
      ----------
      url : str
          URL to download
      path : str, optional
          Destination path to store downloaded file. By default stores to the
          ~/.gluoncv directory with same name as in url.
          You can also change the default behavior by editing ~/.gluoncv/config.yaml.
      overwrite : bool, optional
          Whether to overwrite destination file if already exists.
      overwrite_folder : bool, optional
          Whether to extract file to destination folder if already exists. You may use this option if you suspect
          the destination is corrupted or some files are missing.
      sha1_hash : str, optional
          Expected sha1 hash in hexadecimal digits. Will ignore existing file when hash is specified
          but doesn't match.
      root : str, optional
          Destination root dir to store extracted files. By default it's default in ~/.gluoncv directory.
      disp_depth : int, optional
          If set > 0, will print out the tree structure of extracted dataset folder with maximum `disp_depth`.
  
      Returns
      -------
      str or tuple of str
          The file path of the downloaded file.
      """
      fname = Path(path or URLs.path(url, c_key="archive"))
      fname.parent.mkdir(parents=True, exist_ok=True)
      fname = download(
          url,
          path=str(fname.resolve()),
          overwrite=overwrite,
          sha1_hash=sha1_hash,
      )
      extract_root = URLs.path(url, c_key="data")
      extract_root = extract_root.parent.joinpath(extract_root.stem)
      extract_root.mkdir(parents=True, exist_ok=True)
      if fname.endswith(".zip"):
          folder = unzip(
              fname,
              root=root if root else extract_root,
              strict=overwrite_folder,
          )
      elif fname.endswith("gz"):
          folder = untar(
              fname,
              root=root if root else extract_root,
              strict=overwrite_folder,
          )
      else:
          raise ValueError(
              "Unknown url data with file: {}".format(fname)
          )
  
      if disp_depth > 0:
          try:
              path_tree = PathTree(folder, disp_depth)
              print(path_tree)
          except:
              pass
  
      return Path(folder)
  
file_path: gluon-cv/gluoncv/auto/data/auto_data.py
imports: import os
  import re
  from pathlib import Path
  import yaml
  from ...utils.download import download
  from ...utils.filesystem import unzip, untar, PathTree
label_desc: Use image node_id 1 for calling a global function with example usage: url_data(url, path, overwrite, overwrite_folder, sha1_hash, root, disp_depth) and returns: Path