code: def get_object_properties(
      obj, density=None, friction=None, tmesh=None
  ):
      if tmesh is None:
          tmesh = create_trimesh_from_obj(obj)
  
      if density is None:
          tmesh.density = get_custom_property(obj, "Density", 1.0)
  
      if friction is None:
          friction = get_custom_property(obj, "Friction", 1.0)
  
      rounda = lambda x: np.round(x, decimals=4).tolist()
      roundf = lambda x: float(np.round(x, decimals=4))
  
      properties = {
          "id": obj.name,
          "material": obj.active_material.name
          if obj.active_material
          else None,
          "density": roundf(tmesh.density),
          "friction": roundf(friction),
          "nr_vertices": len(tmesh.vertices),
          "nr_faces": len(tmesh.faces),
          "bounds": rounda(tmesh.bounds),
          "area": roundf(tmesh.area),
          "volume": roundf(tmesh.volume),
          "mass": roundf(tmesh.mass),
          "center_mass": rounda(tmesh.center_mass),
          "inertia": rounda(tmesh.moment_inertia),
          "is_convex": tmesh.is_convex,
          "euler_number": tmesh.euler_number,
      }
      return properties
  
imports: import contextlib
  import copy
  import json
  import pathlib
  import tarfile
  import shutil
  import numpy
  import trimesh
  from kubric.safeimport.bpy import bpy
label_desc: Use image node_id 5 for calling a global function with example usage: get_object_properties(obj, density, friction, tmesh) and returns: properties