code: def download_url(
      url: str,
      dest_dir: str = get_data_dir(),
      name: Optional[str] = None,
  ):
      """Download a file to disk.
  
      Parameters
      ----------
      url: str
          The URL to download from
      dest_dir: str
          The directory to save the file in
      name: str
          The file name to save it as.  If omitted, it will try to extract a file name from the URL
      """
      if name is None:
          name = url
          if "?" in name:
              name = name[: name.find("?")]
          if "/" in name:
              name = name[name.rfind("/") + 1 :]
      if not os.path.exists(dest_dir):
          os.makedirs(dest_dir)
      urlretrieve(url, os.path.join(dest_dir, name))
  
imports: import joblib
  import gzip
  import pickle
  import os
  import tempfile
  import tarfile
  import zipfile
  import logging
  from urllib.request import urlretrieve
  from typing import Any, Iterator, List, Optional, Tuple, Union, cast, IO
  import pandas
  import numpy
  import deepchem
label_desc: Use image node_id 3 for calling a global function with example usage: download_url(url, dest_dir, name) without return types