code: def get_custom_property(obj, name, default):
      # try getting density from material
      mat = obj.active_material
      if mat is None:
          print(
              f"No {name} information found. Using default {name}={default}."
          )
          value = 1.0
      elif name in mat:
          value = mat[name]
          print(f"Using {name}={value} from material {mat}.")
      elif name in obj:
          value = obj[name]
          print(f"Using {name}={value} from object.")
      else:
          print(
              f"No {name} information found. Using default {name}={default}."
          )
          value = 1.0
      return value
  
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 3 for calling a global function with example usage: get_custom_property(obj, name, default) and returns: value