code: def register_physical_object_setters(
      obj: core.PhysicalObject, obj_idx, physics_client: _BulletClient
  ):
      assert isinstance(
          obj, core.PhysicalObject
      ), f"{obj!r} is not a PhysicalObject"
  
      def setter(object_idx, func):
          def _callable(change):
              return func(
                  object_idx, change.new, change.owner, physics_client
              )
  
          return _callable
  
      obj.observe(setter(obj_idx, set_position), "position")
      obj.observe(setter(obj_idx, set_quaternion), "quaternion")
      # TODO Pybullet does not support rescaling. So we should warn if scale is changed
      obj.observe(setter(obj_idx, set_velocity), "velocity")
      obj.observe(
          setter(obj_idx, set_angular_velocity), "angular_velocity"
      )
      obj.observe(setter(obj_idx, set_friction), "friction")
      obj.observe(setter(obj_idx, set_restitution), "restitution")
      obj.observe(setter(obj_idx, set_mass), "mass")
      obj.observe(setter(obj_idx, set_static), "static")
  
imports: import functools
  import inspect
  import logging
  import pathlib
  import sys
  import tempfile
  from typing import Dict, List, Optional, Tuple, Union
  import tensorflow
  from singledispatchmethod import singledispatchmethod
  from kubric import core
  from kubric.redirect_io import RedirectStream
label_desc: Use image node_id 3 for calling a global function with example usage: register_physical_object_setters(obj, obj_idx, physics_client) and returns: _callable, func