code: def _download(url: str, root: str):
      os.makedirs(root, exist_ok=True)
      filename = os.path.basename(urlparse(url).path)
      download_target = os.path.join(root, filename)
  
      if os.path.exists(download_target):
          if not os.path.isfile(download_target):
              raise FileExistsError(
                  f"{download_target} exists and is not a regular file"
              )
          if _verify_checksum(download_target, url):
              return download_target
  
          logger.warning(
              "%s exists, but the checksum does not match; re-downloading the file",
              download_target,
          )
          os.remove(download_target)
  
      response = requests.get(
          url, stream=True, timeout=10.0
      )  # Timeout is for bandit security linter
      response.raise_for_status()
  
      total_size = int(response.headers.get("Content-Length", 0))
  
      with open(download_target, "wb") as file, tqdm(
          total=total_size,
          ncols=80,
          unit="iB",
          unit_scale=True,
          unit_divisor=1024,
      ) as loop:
          for chunk in response.iter_content(chunk_size=8192):
              if chunk:
                  file.write(chunk)
                  loop.update(len(chunk))
  
      if not _verify_checksum(download_target, url):
          raise RuntimeError(
              "Model has been downloaded but the checksum does not match"
          )
  
      return download_target
  
file_path: anomalib/src/anomalib/models/ai_vad/clip/clip.py
imports: import hashlib
  import logging
  import os
  import warnings
  from typing import List, Union
  from urllib.parse import urlparse
  import requests
  import torch
  from PIL import Image
  from pkg_resources import packaging
  from torchvision.transforms import CenterCrop, Compose, Normalize, Resize, ToTensor
  from tqdm import tqdm
  from .model import build_model
label_desc: Use image node_id 2 for calling a global function with example usage: _download(url, root) and returns: download_target, download_target