Compare two objects and their attributes, but allow for non immutable attributes to be equal up to their class.
obj1 (object) – The first object to compare.
obj2 (object) – The second object to compare.