Adding instance_memoize decorator