code: def _download_image(url: str, filename: str = "") -> Path:
      # TODO: move this to testing
  
      filename = url.split("/")[-1] if len(filename) == 0 else filename
      # Download
      bytesio = io.BytesIO(requests.get(url, timeout=60).content)
      # Save file
      with open(filename, "wb") as outfile:
          outfile.write(bytesio.getbuffer())
  
      return Path(filename)
  
imports: import io
  import sys
  from pathlib import Path
  import numpy
  import pytest
  import requests
  import torch
  from kornia.core import Tensor
  from kornia.io import ImageLoadType, load_image, write_image
  from kornia.utils._compat import torch_version_ge
label_desc: Use image node_id 4 for calling a global function with example usage: _download_image(url, filename) and returns: Path