I woul like to execute some code just before an object gets auto-garbage-collected in python. How could this be done?