code: def kubricify(asset, source_dir, target_dir):
      name = asset["id"]
      source_dir = file_io.as_path(source_dir)
      target_dir = file_io.as_path(target_dir)
  
      hdri_source_path = source_dir / f"{name}_4k.hdr"
      tmp_dir = target_dir / name
      if tmp_dir.exists():
          shutil.rmtree(tmp_dir)
      tmp_dir.mkdir(parents=True, exist_ok=False)
  
      json_path = tmp_dir / "data.json"
      tar_path = target_dir / f"{name}.tar.gz"
  
      if tar_path.exists():
          with tarfile.open(tar_path, "r:gz") as tar:
              tar.extract("data.json", tmp_dir)
          asset_entry = file_io.read_json(json_path)
          if asset_entry and "id" in asset_entry:
              shutil.rmtree(tmp_dir)
              return asset_entry["id"], asset_entry
  
      asset_entry = copy.deepcopy(asset)
      del asset_entry["url"]
      asset_entry["kwargs"]["filename"] = "environment_4k.hdr"
  
      file_io.write_json(asset_entry, json_path)
  
      with tarfile.open(tar_path, "w:gz") as tar:
          tar.add(hdri_source_path, asset_entry["kwargs"]["filename"])
          tar.add(json_path, "data.json")
  
      shutil.rmtree(tmp_dir)
  
      return name, asset_entry
  
file_path: kubric/kubric/scripts/download_hdri_haven.py
imports: import argparse
  import copy
  import functools
  import logging
  import multiprocessing
  import pathlib
  import shutil
  import tarfile
  import urllib.error
  import urllib.parse
  import urllib.request
  import requests
  import tqdm
  from kubric import file_io
  from kubric.kubric_typing import PathLike
label_desc: Use image node_id 4 for calling a global function with example usage: kubricify(asset, source_dir, target_dir) and returns: name,  asset_entry, asset_entry,  asset_entry