code: def download_model(model_url: str, model_dir: Path) -> None:
      cache_dir = REPO_DIR / ".cache"
  
      if not cache_dir.exists():
          cache_dir.mkdir()
  
      parts = urlparse(model_url)
  
      filename = Path(parts.path).name
  
      if not cache_dir.joinpath(filename).exists():
          with request.urlopen(model_url) as fin:
              with open(cache_dir / filename, "wb") as fout:
                  fout.write(fin.read())
  
      shutil.copy(cache_dir / filename, model_dir / "model.pt")
  
imports: import shutil
  from pathlib import Path
  from typing import Dict
  from urllib import request
  from urllib.parse import urlparse
label_desc: Use image node_id 1 for calling a global function with example usage: download_model(model_url, model_dir) without return types