code: def prepare_blender_object(
      func: AddAssetFunction,
  ) -> AddAssetFunction:
      """Decorator for add_asset methods that takes care of a few Blender specific settings.
  
      For each asset it:
        - sets the Blender name to the UID of the asset
        - sets the rotation mode to "QUATERNION" (if possible)
        - links it to the current scene collection
      """
  
      @functools.wraps(func)
      def _func(self, asset: core.Asset):
          blender_obj = func(
              self, asset
          )  # create the new blender object
          blender_obj.name = (
              asset.uid
          )  # link the name of the object to the UID
          # if it has a rotation mode, then make sure it is set to quaternions
          if hasattr(blender_obj, "rotation_mode"):
              blender_obj.rotation_mode = "QUATERNION"
          # if object is an actual Object (eg. not a Scene, or a Material)
          # then ensure that it is linked into (used by) the current scene collection
          if isinstance(blender_obj, bpy.types.Object):
              collection = bpy.context.scene.collection.objects
              if blender_obj not in collection.values():
                  collection.link(blender_obj)
  
          return blender_obj
  
      return _func
  
imports: import contextlib
  import copy
  import functools
  import sys
  from typing import Dict, Sequence, Tuple, Union
  import numpy
  import OpenEXR
  import Imath
  import sklearn.utils
  import trimesh
  from kubric import core
  from kubric.kubric_typing import AddAssetFunction, ArrayLike
  from kubric.redirect_io import RedirectStream
  from kubric.safeimport.bpy import bpy
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_blender_object(func) and returns: _func, blender_obj