code: def download_url(
      url: str,
      folder: str,
      log: bool = True,
      filename: Optional[str] = None,
  ):
      r"""Downloads the content of an URL to a specific folder.
  
      Args:
          url (str): The URL.
          folder (str): The folder.
          log (bool, optional): If :obj:`False`, will not print anything to the
              console. (default: :obj:`True`)
          filename (str, optional): The filename of the downloaded file. If set
              to :obj:`None`, will correspond to the filename given by the URL.
              (default: :obj:`None`)
      """
      if filename is None:
          filename = url.rpartition("/")[2]
          filename = (
              filename if filename[0] == "?" else filename.split("?")[0]
          )
  
      path = osp.join(folder, filename)
  
      if fs.exists(path):  # pragma: no cover
          if log and "pytest" not in sys.modules:
              print(f"Using existing file {filename}", file=sys.stderr)
          return path
  
      if log and "pytest" not in sys.modules:
          print(f"Downloading {url}", file=sys.stderr)
  
      os.makedirs(folder, exist_ok=True)
  
      context = ssl._create_unverified_context()
      data = urllib.request.urlopen(url, context=context)
  
      with fsspec.open(path, "wb") as f:
          # workaround for https://bugs.python.org/issue42853
          while True:
              chunk = data.read(10 * 1024 * 1024)
              if not chunk:
                  break
              f.write(chunk)
  
      return path
  
file_path: pytorch_geometric/torch_geometric/data/download.py
imports: import os
  import os.path
  import ssl
  import sys
  import urllib
  from typing import Optional
  import fsspec
  from torch_geometric.io import fs
label_desc: Use image node_id 1 for calling a global function with example usage: download_url(url, folder, log, filename) and returns: path, path