code: def ensure_lpips_weights_exist(weight_path_out):
      """Downloads weights if needed."""
      if os.path.isfile(weight_path_out):
          return
      print(
          "Downloading LPIPS weights:",
          _LPIPS_URL,
          "->",
          weight_path_out,
      )
      urllib.request.urlretrieve(_LPIPS_URL, weight_path_out)
      if not os.path.isfile(weight_path_out):
          raise ValueError(
              f"Failed to download LPIPS weights from {_LPIPS_URL} "
              f"to {weight_path_out}. Please manually download!"
          )
  
file_path: compression/models/hific/helpers.py
imports: import collections
  import enum
  import os
  import pprint
  import urllib.request
label_desc: Use image node_id 1 for calling a global function with example usage: ensure_lpips_weights_exist(weight_path_out) without return types