code: def kubricify(
      obj: bpy.types.Object, output_path: PathLike, asset_license
  ):
      logger.info("Kubricifying %s", obj.name)
      with tempfile.TemporaryDirectory() as tmpdir:
          tmpdir = file_io.as_path(tmpdir)
          logger.info("applying transformations ...")
          blender_utils.apply_transformations(obj)
          logger.info("triangulating ...")
          blender_utils.triangulate(obj)
          logger.info("centering mesh around center of mass")
          blender_utils.center_mesh_around_center_of_mass(obj)
  
          logger.info(
              "computing and exporting properties of object to data.json"
          )
          properties = get_object_properties(obj)
          properties["id"] = obj.name
          properties["license"] = asset_license
          properties["asset_type"] = "FileBasedObject"
          properties["paths"] = {
              "visual_geometry": "visual_geometry.obj",
              "collision_geometry": "collision_geometry.obj",
              "urdf": "object.urdf",
          }
  
          asset_entry = {
              "id": properties["id"],
              "asset_type": properties["asset_type"],
              "license": asset_license,
              "kwargs": {
                  "bounds": properties["bounds"],
                  "mass": properties["mass"],
                  "simulation_filename": "{asset_dir}/"
                  + properties["paths"]["urdf"],
                  "render_filename": "{asset_dir}/"
                  + properties["paths"]["visual_geometry"],
              },
              "metadata": {
                  "nr_faces": properties["nr_faces"],
                  "nr_vertices": properties["nr_vertices"],
                  "volume": properties["volume"],
                  "surface_area": properties["surface_area"],
              },
          }
  
          file_io.write_json(asset_entry, tmpdir / "data.json")
  
          logger.info("exporting visual geometry")
          vis_path = tmpdir / properties["paths"]["visual_geometry"]
          with blender_utils.selected(obj), blender_utils.centered(obj):
              bpy.ops.export_scene.obj(
                  filepath=str(vis_path),
                  axis_forward="Y",
                  axis_up="Z",
                  use_selection=True,
                  use_materials=True,
              )
          logger.info("generating and exporting collision geometry")
          coll_path = tmpdir / properties["paths"]["collision_geometry"]
          with redirect_io.RedirectStream(stream=sys.stdout):
              pb.vhacd(
                  str(vis_path),
                  str(coll_path),
                  str(tmpdir / "pybullet.log"),
              )
          os.remove(tmpdir / "pybullet.log")
  
          logger.info("exporting URDF file")
          urdf_path = tmpdir / properties["paths"]["urdf"]
          with open(urdf_path, "w", encoding="utf-8") as f:
              f.write(URDF_TEMPLATE.format(**properties))
  
          out_path = output_path / (properties["id"] + ".tar.gz")
          logger.info("packing all files into single %s", out_path)
          with tarfile.open(out_path, "w:gz") as tar:
              for p in tmpdir.glob("*"):
                  tar.add(p, arcname=p.name)
  
          return properties["id"], asset_entry
  
file_path: kubric/kubric/scripts/kubasic.py
imports: import argparse
  import logging
  import os
  import re
  import sys
  import tarfile
  import tempfile
  from typing import Optional
  import bpy
  import numpy
  import pybullet
  from kubric import file_io
  from kubric.renderer import blender_utils
  from kubric.kubric_typing import PathLike
  from kubric import redirect_io
label_desc: Use image node_id 2 for calling a global function with example usage: kubricify(obj, output_path, asset_license) and returns: properties,  asset_entry