code: def _urlretrieve(
      url: str, filename: Union[Path, str], chunk_size: int = 1024
  ) -> None:
      with open(filename, "wb") as fh:
          with urllib.request.urlopen(
              urllib.request.Request(
                  url, headers={"User-Agent": USER_AGENT}
              )
          ) as response:
              with tqdm(total=response.length) as pbar:
                  for chunk in iter(
                      lambda: response.read(chunk_size), ""
                  ):
                      if not chunk:
                          break
                      pbar.update(chunk_size)
                      fh.write(chunk)
  
file_path: doctr/doctr/utils/data.py
imports: import hashlib
  import logging
  import os
  import re
  import urllib
  import urllib.error
  import urllib.request
  from pathlib import Path
  from typing import Optional, Union
  from tqdm.auto import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: _urlretrieve(url, filename, chunk_size) without return types